07-07-2009
Don't reboot or use NTP time to compute the HRT offset between reboots.
10 More Discussions You Might Find Interesting
1. Solaris
I've installed Solaris 8, but didn't quite give it the correct (machine) time.
Think the machine is out of sync.
Can I change that afterwards or do I have to do another install right from the beginning? (1 Reply)
Discussion started by: kuultak
1 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
Can anyone tell me how to find the System Startup time.
Currently I am using "who -b" to get last reboot time.
I wanted to know is there any log file for SCO Openserver 5, in which all this sort of imformations are kept.
I have tried searching the forum with words like "WHO... (6 Replies)
Discussion started by: shoeb_syed
6 Replies
3. Shell Programming and Scripting
Hey all,
I need to write a script which will invoke another script everything 5 minutes until certain time is reached (say 4:00 pm). Can anyone give me some pointers please? Thanks! (1 Reply)
Discussion started by: mpang_
1 Replies
4. UNIX for Advanced & Expert Users
Hi,
What is the best way to find the last installation time of an unix based systems?Please advise
Thanks
Nagarajan G (7 Replies)
Discussion started by: ennstate
7 Replies
5. Shell Programming and Scripting
I have a requirement of checking the current system time and performing certain actions in a shell script. example:
if the current system time is greater than 1400 hrs, then perform step 1,2,3
if the current system time is greater than 1000 hrs, then perform step 1,2
if the current system time... (2 Replies)
Discussion started by: zainravi
2 Replies
6. Shell Programming and Scripting
I am trying to write a script which will compare the start time of a process with the current time. but I am having trouble finding the command to get the current time. (3 Replies)
Discussion started by: akabir77
3 Replies
7. Solaris
On Solaris 10 server the system date won't match with the timestamp on files created by a cron jobs, Please help
here is what i get when i check for system date
infodba-ie10ux014:/tcpdv1_ie10/tcadmin/bin\n\r-> date
Tue Apr 24 15:27:43 GMT 2012at same time i executed a cron job, and checked... (4 Replies)
Discussion started by: karghum
4 Replies
8. Shell Programming and Scripting
Hi ,
I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( .
how to find cpu's system high time and user time high in a script??
thanks , help would be appreciated !
:) (9 Replies)
Discussion started by: sushwey
9 Replies
9. Shell Programming and Scripting
Hi All,
Is there any command to add additional time to date command. I need to add 5 hours to the present system time. I am getting the time by using date command.
WORKFLOW_START_TIME=`date +%m/%d/%Y\ %H:%M:%S`
Thanks (8 Replies)
Discussion started by: nag_sathi
8 Replies
10. Linux
Hey everyone. Upon studying linux trying to learn it inside and out, I'm reading about the issue of time. Hardware clock time vs the more commonly referenced System Time. What causes the two to grow apart, and what causes the time itself to stray away from UTC? at present my clock is a second and... (1 Reply)
Discussion started by: Lost in Cyberia
1 Replies
LEARN ABOUT SUSE
gethrtime
gethrtime(3C) Standard C Library Functions gethrtime(3C)
NAME
gethrtime, gethrvtime - get high resolution time
SYNOPSIS
#include <sys/time.h>
hrtime_t gethrtime(void);
hrtime_t gethrvtime(void);
DESCRIPTION
The gethrtime() function returns the current high-resolution real time. Time is expressed as nanoseconds since some arbitrary time in the
past; it is not correlated in any way to the time of day, and thus is not subject to resetting or drifting by way of adjtime(2) or settime-
ofday(3C). The hi-res timer is ideally suited to performance measurement tasks, where cheap, accurate interval timing is required.
The gethrvtime() function returns the current high-resolution LWP virtual time, expressed as total nanoseconds of execution time.
The gethrtime() and gethrvtime() functions both return an hrtime_t, which is a 64-bit (long long) signed integer.
EXAMPLES
The following code fragment measures the average cost of getpid(2):
hrtime_t start, end;
int i, iters = 100;
start = gethrtime();
for (i = 0; i < iters; i++)
getpid();
end = gethrtime();
printf("Avg getpid() time = %lld nsec
", (end - start) / iters);
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
proc(1), adjtime(2), gettimeofday(3C), settimeofday(3C), attributes(5)
NOTES
Although the units of hi-res time are always the same (nanoseconds), the actual resolution is hardware dependent. Hi-res time is guaran-
teed to be monotonic (it won't go backward, it won't periodically wrap) and linear (it won't occasionally speed up or slow down for adjust-
ment, like the time of day can), but not necessarily unique: two sufficiently proximate calls may return the same value.
SunOS 5.10 7 Sep 2004 gethrtime(3C)