LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-28-2008, 10:59 PM   #1
fariborz
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
hardware-clock synchronization


hi

How do i synchronize hardware-clock with system-clock without using 'hwclock' and 'NTP'?
Is there any way to do this job with programming?
 
Old 04-29-2008, 12:59 AM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
Look for adjtimex function
 
Old 04-29-2008, 01:07 AM   #3
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
No sorry, adjtimex is for system clock (as NTP, NTP doesn't deal with your RTC).
Take a look to the ioctl provided for /dev/rtc, or download "hwclock" sources to see how it does the job.
 
Old 05-02-2008, 07:54 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
2 Q's:
OP,
I'm curious (not critical), why the objection to hwclock?
(Does it relate to:)

Anyone,
Is there anyway to get the actual, the raw, BIOS h/w clock time from the CLI? In other words to verify that it is set to UTC as I intend & have told hwclock?

I have read the hwclock man page & I don't see any way to do this. If I am reading it correctly, I tell hwclock which I think it, the BIOS clock, is set to, but there is no way to verify that my intentions have been carried out (& not changed), short of rebooting & checking the BIOS Setup.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
Failed to set system clock to hardware clock jrtayloriv Linux - Newbie 2 09-25-2008 07:06 AM
clock synchronization rasejo Linux - General 12 07-12-2007 06:53 PM
Slow system clock and stray hardware clock, pleas help! Epox Linux - General 6 01-02-2007 02:43 PM
RAID hardware : synchronization probelm arunka Linux - Hardware 0 02-08-2006 12:25 AM


All times are GMT -5. The time now is 09:23 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration