TimeStamp wrong

Home Forums CodeSite TimeStamp wrong

Viewing 2 reply threads
  • Author
    Posts
    • #4055
      David Rose
      Participant

        Possibly an edge case – but why is the TimeStamp on a message not generated in real time ?

        I have CS running on my development VmWare machine (guest). If I hibernate my host machine, then when I unhibernate it, any new CS messages are timestamped relative to the hibernation time.

        e.g My last Codesite message is timestamped 23:00, I hibernate my host machine. At 10am I unhibernate my host machine and the next codesite message is timestamped 23:01.

        I’ve not worked out how to reset the Timestamp to be the real time other then by restarting everything.

      • #4056
        Ray Konopka
        Keymaster

          Hi David,
          CodeSite 5 (and earlier) uses the QueryPerformanceCounter to generate a timestamp for each message. The count is compared to a base count value at app start up to generate a time stamp. From what you describe, it sounds like QueryPerformanceCounter is not returning an accurate count after the host machine is returned from hibernating. Just to be clear, you mention that you hibernate the host machine and not the VM itself. I’m curious if other time values are affected when you resume from hibernation. For example, what does the clock in the system tray show immediately after resuming?

          BTW, the QueryPerformanceCounter was necessary in order to get a more precise timestamp value (ms resolution). However, this is no longer necessary with modern versions of Windows. As a result, CodeSite 6 no longer uses the QueryPerformanceCount and instead utilizes the TStopWatch class.

          Ray

        • #4057
          David Rose
          Participant

            Hi Ray

            Thanks for the explanation. Makes perfect sense.
            The clock will show the wrong time for a second or two, but I guess it syncs with an NTP server somewhere so corrects itself swiftly.

            CodeSite 6 ? 🙂

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.