C time in milliseconds function.


 
Thread Tools Search this Thread
Top Forums Programming C time in milliseconds function.
# 1  
Old 06-23-2003
C time in milliseconds function.

I need a c function which return the time in:
hour min sec and mil sec

I am writing on unix os.
# 2  
Old 06-23-2003
See this thread which should get you on your way - and please read the rules (you should have searched before asking the question).
# 3  
Old 06-27-2003
Try with usleep ( ) Standard C Library routine
# 4  
Old 07-09-2003
MySQL

You can also find all the time functions you want in the book
Learn C in 21 days Sum's publishing. Although, ive never used them so far, i found them quite helpful, having a huge variety of them!Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calculate Time diff in milli milliseconds(Time format : HH:MM:SS,NNN)

Hi All, I have one file which contains time for request and response. I want to calculate time difference in milliseconds for each line. This file can contain 10K lines. Sample file with 4 lines. for first line. Request Time: 15:23:45,255 Response Time: 15:23:45,258 Time diff... (6 Replies)
Discussion started by: Raza Ali
6 Replies

2. UNIX for Beginners Questions & Answers

Milliseconds Not Capture

while I load the value using sqlldr the millisecond values not stored in oracle table. Value: '26-OCT-17 08.59.50.916000000 AM' CTL field: SRC_SYS_CRT_TS Position(23:48) "decode(:SRC_SYS_CRT_TS,null,sysdate-1,to_timestamp(:SRC_SYS_CRT_TS,'yyyy-mm-dd.hh24.mi.ss.FF'))", ... (1 Reply)
Discussion started by: priya1987
1 Replies

3. Solaris

Process execution time in milliseconds

Hey everyone, I'm coming from Linux where the top command gave me lots of process info (particularly CPU time in milliseconds) and I'm trying to find similar info in Solaris. So far I've looked at prstat and ps but neither give cpu time in milliseconds, both seem to have 1 second... (2 Replies)
Discussion started by: maniac_ie
2 Replies

4. Shell Programming and Scripting

Getting Time in MilliSeconds with Perl

I use something like this in perl to get the date and time: use Time::localtime; use Time::gmtime; $tm = gmtime; $time_str = sprintf "%04d-%02d-%02d %02d:%02d:%02d", $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec; It gives me something like this: 2010-08-26... (1 Reply)
Discussion started by: lforum
1 Replies

5. UNIX for Dummies Questions & Answers

time function

hello everybody! i want to post a question. So, I use the command 'time a.out' to time the duration of the program a.out. The return value of this function was: real 0m4.116s user 0m4.112s sys 0m0.016s What i want is! I try to find a way to get (NOT manually) the value of real time.... (2 Replies)
Discussion started by: nicos
2 Replies

6. Shell Programming and Scripting

Nawk Time Function

Hi All, I am using solaris and nawk. Is there any time function in nawk which is simliar to the shell `date` function ? Can any experts show any examples? (4 Replies)
Discussion started by: Raynon
4 Replies

7. Shell Programming and Scripting

Convert milliseconds to standard time

hello, I have the uptime of the server showing as upTime=2427742050 How do I convert it to standard time. Thanks Chiru (1 Reply)
Discussion started by: chiru_h
1 Replies

8. Programming

function time

Hello I have problem with function 'time' to test my program for file copying . How to run the function in my source code ? I try something like that: system("time"); < -- but this don't working (2 Replies)
Discussion started by: scotty_123
2 Replies

9. Shell Programming and Scripting

time function

Hi, I would like to display the exact time taken to complete running a particular tool or function or program to user I don't know the exact time functions in unix, please help me thanks in advance Example: $test.ksh output should be The... (10 Replies)
Discussion started by: hsekol
10 Replies

10. UNIX for Dummies Questions & Answers

useing date or other time style utility to get milliseconds.

hello everyone. im sure someone has run into the problem of timestamping files and end up haveing 2 files with the same name thus over writeing one of them. In my application i am trying to get a timestamp w/ milliseconds but i am haveing no luck and finding an answer in the man pages. I know... (3 Replies)
Discussion started by: Optimus_P
3 Replies
Login or Register to Ask a Question