At 05:35 PM 10/25/2004 -0000, bretedward writeth:
>Inside my C program, I would like to capture the current system time
>at a sub-second level and stuff it into a variable. All of the C time
>related functions that I am finding only go down to the second.
>
>There is a DOS command "time" that returns the system to the
>screen down to 100ths of a second. I can call it from my C program
>with: system("time); I have tried using it directly in my C program
>script with no
>success. The problem is that I don't know how to capture it when it
>shows up on the screen, not to mention that the DOS window pops up
>and disappears in a flash. I have tried using the C command getchar.
>This also does not work.
>
>I would like to capture the time in a string variable in my
>program.
>
>Thanks to the folks that answered my last question regarding host
>name. It solved my problem.

What exactly are you going to do with a fractional timestamp?  Anyway,
clock() is fairly portable, but has different accuracies depending on the
implementation.  The implementation I primarily use has a millisecond
accuracy rating.

And you are welcome.  That's what this group is for.


Thomas J. Hruska
[EMAIL PROTECTED]

Shining Light Productions
Home of the Nuclear Vision scripting language and ProtoNova web server.
http://www.slproweb.com/





To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=315388.5526708.6599542.3001176/D=groups/S=:HM/A=2372354/rand=423947740


Yahoo! Groups Links

Reply via email to