>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 | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
