8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is it possible to display the clock (timing) on the screen all the time. (3 Replies)
Discussion started by: vino.paal
3 Replies
2. Programming
#include<iostream>
#include<time.h>
using namespace std;
int main()
{
system("date");
clock_t start = clock();
int i=9*8;
while(i--)
{
int j=9999999;
while(j--);
}
clock_t end = clock();
double elapsed =... (4 Replies)
Discussion started by: johnbach
4 Replies
3. Solaris
Hi there!!!
Need your help in solving some tricky problems.
Since clock() as such is buggy on SUN OS 5 we have started using gettimeofday() in our RTOS applications based on Solaris 9.
The problems we actually encountered previously were - the applications kind of freeze/hang eternally on... (1 Reply)
Discussion started by: smanu
1 Replies
4. UNIX for Advanced & Expert Users
Hi
We had a AIX box built last year but was set to the correct GMT time, but using DST time zone. In march this year the clocks went forward without issues. (if I remember a couple of weeks early due to the DST zone)
This year we decided to change the clock to the correct time zone before... (0 Replies)
Discussion started by: markab2
0 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Is there a chance that the clock() call returns 0 eternally???
Using BSD. My RTOS application freezes inconsistently only on particular hosts. When debugging it, I came to see that the RTOS timer does not tick at times. The underlying system call is clock() & it always returns zero when the... (4 Replies)
Discussion started by: smanu
4 Replies
6. Programming
Hey all,
i need a program to get the CPU ticks at certain points of my program. So, i thought about using the clock function, but i'm having a hard time figuring out how it really works. I wrote this simple program to try to understand it but it made me feel more confused:
#include <stdio.h>... (5 Replies)
Discussion started by: kastrup_carioca
5 Replies
7. UNIX Desktop Questions & Answers
Guys could you please tell me which appropriate command is used to set hardware (BIOS) clock so that the system keeps time when it reboots & how it's used. I use Linux
Thank you (2 Replies)
Discussion started by: joseph kembo
2 Replies
8. UNIX for Dummies Questions & Answers
Hey ppl, i was wonddering, in mandrake, how to get the clok to display the time in non-military format....hehe thank you im just tired of looking at 18:00 hehe thank you (2 Replies)
Discussion started by: LolapaloL
2 Replies
ADJTIME(2) Linux Programmer's Manual ADJTIME(2)
NAME
adjtime - smoothly tune kernel clock
SYNOPSIS
#include <sys/time.h>
int adjtime(const struct timeval *delta, struct timeval *olddelta);
DESCRIPTION
This function speeds up or slows down the system clock in order to make a gradual adjustment. This ensures that the calendar time reported
by the system clock is always monotonically increasing, which might not happen if you simply set the clock.
The delta argument specifies a relative adjustment to be made to the clock time. If negative, the system clock is slowed down fora while
until it has lost this much elapsed time. If positive, the system clock is speeded up for a while.
If the olddelta argument is not a null pointer, the adjtime function returns information about any previous time adjustment that has not
yet completed.
This function is typically used to synchronize the clocks of computers in a local network. You must be a privileged user to use it.
RETURN VALUE
The adjtime function returns 0 on success and -1 on failure and sets the external variable errno accordingly.
ERRORS
EPERM The calling process does not have enough privileges to access the clock.
NOTE
With a Linux kernel, you can use the adjtimex(2) function to permanently change the system clock speed.
CONFORMING TO
This function is derived from 4.3 BSD and SVr4.
SEE ALSO
adjtimex(2), settimeofday(2)
Linux 2.0 2002-02-16 ADJTIME(2)