LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-22-2021, 01:51 AM   #1
BruceV
LQ Newbie
 
Registered: Jan 2016
Posts: 22

Rep: Reputation: Disabled
Looking for an API for accurate time


I run Debian on an ARM machine, partway between a desktop and an embedded system. It is networked with internet access, but has no GUI interface, all console access is via the terminal. I'm looking for something like the gettime() function, except that rather than accessing the system clock, it polls one of the more accurate sources on the internet. It needs to be an API function, because the application involved runs constantly, and needs to call up accurate time anytime, in response to other inputs.

Network delays are unlikely to be a problem, the requirement here is to avoid the steady slip that results from typical system clock sources, eg. 50ppm crystals.
 
Old 03-22-2021, 01:57 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,069

Rep: Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363
do you know ntpd ? That will maintain the system time in synchronization with time servers.
I think you want something similar.
 
1 members found this post helpful.
Old 03-25-2021, 02:14 AM   #3
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
NTP is your go to for time synchronization
 
  


Reply

Tags
api, debian 9, times



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
Can't get accurate time in MT program torque_dwf Linux - Software 1 03-24-2008 12:35 PM
ntpd not keeping time accurate humbletech99 Linux - Networking 2 05-22-2007 09:41 AM
sound is mute & time is not accurate @ Unstable, 2.6 janus_tr Debian 3 08-25-2006 12:25 PM
System time not staying accurate sp|k3 Linux - General 10 01-02-2004 06:14 PM
How do I keep accurate time? teeno Linux - Software 8 10-11-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:29 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration