LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Read and write the HW clock (https://www.linuxquestions.org/questions/linux-newbie-8/read-and-write-the-hw-clock-790743/)

raghu437 02-22-2010 02:43 AM

Read and write the HW clock
 
hi..
how to read and write i.e setting of hardware clock through c program on linux

crts 02-22-2010 02:45 AM

Quote:

Originally Posted by raghu437 (Post 3872287)
hi..
how to read and write i.e setting of hardware clock through c program on linux

Hi,

since this has nothing to do with the problem dealt with in this thread you should start a new thread for your specific problem.

Tinkster 02-22-2010 02:48 AM

Quote:

Originally Posted by crts (Post 3872293)
Hi,

since this has nothing to do with the problem dealt with in this thread you should start a new thread for your specific problem.

and it has been reported with a message to this effect.

pixellany 02-22-2010 06:20 AM

and now--as if by magic--it is moved.

If I'm not mistaken, you can call the BASH "date" command (or any other BASH command) from C----Something like a "system" call?

catkin 02-22-2010 08:28 AM

Code:

c@CW8:~$ apropos clock | grep '(2)'
adjtimex []          (2)  - tune kernel clock
alarm []            (2)  - set an alarm clock for delivery of a signal
clock_getres []      (2)  - clock and time functions
clock_gettime []    (2)  - clock and time functions
clock_nanosleep []  (2)  - high-resolution sleep with specifiable clock
clock_settime []    (2)  - clock and time functions

clock_gettime and clock_settime look promising.

raghu437 03-18-2010 02:38 AM

hi friends,
how can i add <allegro.h> header file. im using fedora 12.
thnx


All times are GMT -5. The time now is 08:31 PM.