Results 1 to 2 of 2

Thread: printing time stamps

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    printing time stamps

    I am writing streams of information to a text file and on each line i need a time stamp that is very very very accurate, stupidly accurate infact so it will say something like:

    13:30:336252458559655


    I need this to time keystrokes and how quickly in succession they are typed!

    Any ideas would be greatfully recieved


    Cheers
    Andy

  2. #2
    Lively Member
    Join Date
    May 2000
    Posts
    84
    If your program controls the timing of events (start-stop like a stopwatch) then the best precision you can get would involve using the performance counter. This does not give you the current system time, but can be used to get starting and stoppoing counts which can be resolved into times down to a fraction of a second. You need to use QuerryPerformaceFrequency and QueryPerformanceCounter.

    If your program is meant to take times at which events occur on a machine (database updates, user login times, etc) then I think functions such at GetSystemTime would be better.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width