github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/pkg/rtc/rtc_notlinux.go (about) 1 // Copyright 2019 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build !linux 6 7 package rtc 8 9 import ( 10 "errors" 11 "time" 12 ) 13 14 type syscalls interface{} 15 16 type realSyscalls struct{} 17 18 // Read implements Read for RTC, returning time.Now() 19 func (r *RTC) Read() (time.Time, error) { 20 return time.Now(), nil 21 } 22 23 // Set returns an error for RTC 24 func (r *RTC) Set(tu time.Time) error { 25 return errors.New("not supported") 26 }