LinuxQuestions.org
Review your favorite Linux distribution.
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 12-13-2005, 04:09 AM   #1
sjcoder
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Rep: Reputation: 0
function call to get tick count in millisecond?


What is the right way to get tick count in miliseconds?

sjcoder
 
Old 12-13-2005, 04:11 AM   #2
sjcoder
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Original Poster
Rep: Reputation: 0
get tick count in millisecond?

What is the right way to get tick count in milliseconds? Any example?

sjcoder
 
Old 12-13-2005, 07:47 AM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
gettimeofday gives you back the following struct:

Code:
struct timeval {
     time_t         tv_sec;        /* seconds */
     suseconds_t    tv_usec;  /* microseconds */
};
You can calculate the milliseconds from that.

man gettimeofday for more information.

PS. I've moved this to programming and merged your two threads.
 
  


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
How to call another function from a function? geminigal Programming 4 04-21-2005 10:41 PM
No Matching Function for Call ! vipinsharma Programming 2 07-05-2004 01:58 PM
how to call function?? harpal Programming 3 04-29-2003 05:59 AM
how to call a c++ member function from _init()? cybercop12us Programming 2 01-16-2003 06:56 AM
maximum value of count in read system call udayan Programming 2 06-13-2002 06:51 AM

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

All times are GMT -5. The time now is 12:49 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