#209 [PATCH] Use gettimeofday()


This patch uses gettimeofday() so that programs under dosbox use accurate real UTC time values.
Useful for logging programs.


  • Peter Veenstra

    Peter Veenstra - 2008-05-09

    Logged In: YES
    Originator: NO


    Well there is in principle nothing wrong with this patch, but it does have a few drawbacks. (we considered using timeofday ourselves a long time ago).
    First of all this breaks the time between emulated bios and dos.
    Secondly using a system call is a bit heavy as certian games call this function a lot. (they use it for timing (yeah some games are odd))
    it has that way the possibility to mess up their internal timing as time might flow faster/slower in dosbox due to various reasons (for example if you pause dosbox, then gettmeofday would still increase the time, but the application will see a jump in the time suddenly))

  • James Courtier-Dutton

    Logged In: YES
    Originator: YES

    I agree that there are different applications. Some application want virtual time, and some want accurate real time. So, maybe this should be a config file config option, so one could use it on a per dosbox instance basis.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks