Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

inittodr(9) [freebsd man page]

INITTODR(9)						   BSD Kernel Developer's Manual					       INITTODR(9)

NAME
inittodr -- initialize system time SYNOPSIS
#include <sys/types.h> #include <sys/systm.h> void inittodr(time_t base); DESCRIPTION
The inittodr() function determines the time and sets the system clock. It tries to pick the correct time using a set of heuristics that examine the system's battery backed clock and the time obtained from the root file system, as given in base. How the base value is obtained will vary depending on the root file system type. The heuristics used include: o If the battery-backed clock has a valid time, it is used. o If the battery-backed clock does not have a valid time, the time provided in base will be used. Once a system time has been determined, it is stored in the time variable. DIAGNOSTICS
The inittodr() function prints diagnostic messages if it has trouble figuring out the system time. Conditions that can cause diagnostic mes- sages to be printed include: o The battery-backed clock's time appears nonsensical. SEE ALSO
resettodr(9), time(9) BUGS
On many systems, inittodr() has to convert from a time expressed in terms of year, month, day, hours, minutes, and seconds to time, expressed in seconds. Many of the implementations could share code, but do not. Each system's heuristics for picking the correct time are slightly different. The FreeBSD implementation should do a better job of validating the time provided in base when the battery-backed clock is unusable. Cur- rently it unconditionally sets the system clock to this value. BSD
March 22, 1997 BSD

Check Out this Related Man Page

clock(3C)																 clock(3C)

NAME
clock() - report CPU time used SYNOPSIS
DESCRIPTION
returns the amount of CPU time (in microseconds) used since the first call to The time reported is the sum of the user and system times of the calling process and its terminated child processes for which it has executed , or (see wait(2) , system(3S), and popen(3S)). To deter- mine the time in seconds, the value returned by should be divided by the value of the macro The resolution of the clock varies, depending on the hardware and on software configuration. If the processor time used is not available or its value cannot be represented, the function returns the value WARNINGS
The value returned by is defined in microseconds for compatibility with systems that have CPU clocks with much higher resolution. Because of this, the value returned wraps around after accumulating only 4295 seconds of CPU time (about 72 minutes). DEPENDENCIES
The default clock resolution is 10 milliseconds. SEE ALSO
times(2), wait(2), system(3S), thread_safety(5). STANDARDS CONFORMANCE
clock(3C)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Correcting system time

(1 Reply)
Discussion started by: kuultak
1 Replies

2. HP-UX

HPUX monitoring and alerting script per CPU

Hi Guys, Hopefully someone would be able to help me out. Basically I have an HPUX 11.11i system which is backed up by Data Protector 4.5. Every so often the vdba process hangs and chews up 100% of one of the systems CPU resources. As our monitoring tool can only monitor on a per system basis... (3 Replies)
Discussion started by: fulhamfcboy
3 Replies

3. UNIX for Dummies Questions & Answers

Real time of a clock for every 60 seconds in unix

hi can any one guide me on how to display real time of a clock in unix for every 60 seconds (2 Replies)
Discussion started by: ramnadh_babu
2 Replies

4. Programming

c/c++ clock like , battery charging

Hi all , I need to make a program who describes this ( upper ) graphic: http://upload.wikimedia.org/wikipedia/commons/8/82/Sawtooth-td_and_fd.png My idea is to implement a battery charge x: 0 to time T, y : 0 to 1 values. Can you help me ? (1 Reply)
Discussion started by: jerold
1 Replies

5. UNIX for Dummies Questions & Answers

how to get the same time in two systems,

Hi all, how to get the same time in two systems, for example: in one system i have the correct time, and second system i have wrong time. now i want the first sytem to second sytem, i dont to want to do this work manually. i know there is one command to get the time. in ntp. ... (3 Replies)
Discussion started by: anishkumarv
3 Replies

6. Windows & DOS: Issues & Discussions

Clock doesn't tick

This is a strange one, I've never seen anything like it; the realtime clock doesn't tick while the computer's idle, only when you're watching it. Leave for 3 hours and it'll be 3 hours off. It still advances when it's off however, or the time would be far more incorrect than it is. About all... (10 Replies)
Discussion started by: Corona688
10 Replies

7. UNIX and Linux Applications

how can i change inactive backed up filename on tsm

does any one know how to change inactive filename that is backed up on tsm? (1 Reply)
Discussion started by: curtis911
1 Replies