Documentation
¶
Overview ¶
Package rtc provides access to a device's Real Time Clock (hardware clock)
Index ¶
Constants ¶
View Source
const ( // HwclockTimeout defines the hwclock command execution timeout. HwclockTimeout = 3 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RTC ¶
type RTC struct { // DevName indicates which RTC to use. For example DevName="rtc1" means that /dev/rtc1 will be used. DevName string // LocalTime indicates whether the "--localtime" flag should be set with the hwclock command. LocalTime bool // NoAdjfile indicates whether the "--noadjfile" flag should be set with the hwclock command. NoAdjfile bool }
RTC represents a real time clock that is accessed with the "hwclock" command.
func (RTC) HwclockArgs ¶
HwclockArgs returns the necessary arguments to be passed as flags with hwclock command based on the RTC struct state.
Click to show internal directories.
Click to hide internal directories.