LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-03-2005, 05:00 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
strftime(buffer,50,"%d/%m/%Y %H:%M:%S",loctime);


How do u know how can i also get the milliseconds of time?
strftime(buffer,50,"%d/%m/%Y %H:%M:%S",loctime);

With the strftime i can get and the secs but i am not sure that this function can provide me also the ms.. I have cheched the manual but nothing appropriate
was found
 
Old 09-03-2005, 01:07 PM   #2
mschutte
Member
 
Registered: Jan 2005
Location: Innsbruck, Austria
Distribution: Debian GNU/Linux Lenny
Posts: 68

Rep: Reputation: 15
Sorry, but I think the system clock is not exactly enough to provide milliseconds information. `struct tm', the data structure holding system clock information (see localtime(3)), has no entry therefore.
 
Old 09-04-2005, 04:00 AM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
Are u sure about that?
 
Old 09-09-2005, 06:26 AM   #4
mschutte
Member
 
Registered: Jan 2005
Location: Innsbruck, Austria
Distribution: Debian GNU/Linux Lenny
Posts: 68

Rep: Reputation: 15
Sorry, I was away for some days.
I've finally found a function which can give you the number of seconds since the Epoch, and the number of additional microseconds. Have a look at gettimeofday(2), declared in <sys/time.h>.

Hope I could help,
mschutte
 
  


Reply



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
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Cedega - Morrowind: no more "unknown frame buffer" error (inc. my config file) fonejack Linux - Games 6 06-19-2005 05:02 PM
"connect: No buffer space available" in my local network area SpaceCowboy Linux - Networking 5 08-30-2004 02:44 AM
Change buffer delimiter from "\n" SaTaN Programming 14 10-11-2003 09:33 AM
Error "No Buffer Space Available !" Dan Angelescu *BSD 0 01-04-2003 06:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:58 PM.

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