Re: [hatari-devel] Strange timestamp issue |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Strange timestamp issue
- From: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Sat, 27 Jul 2024 14:05:59 +0200
- Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1722081962; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=xXPYx/G02k2UiwVBa8yGqnaMuYf0Uad9yI2xijfzFNk=; b=To6moR7GqvZqVso5OQop35Ftp4rlgIjfR1xtijQ+rReqXVL+LE/4Kj9d+Mt8PAER1x fNNAdTLn9R/9V2f6/Qg/ojS7jmXptAuswogi0lw99wiB6OWEsxMywwCB1xboKHRkeSVB ujShdhugzEbEbMwVV45kghXnOEYwx1HhbtgC2MqnuD/ezr9W6bdrWUhdLTuFI+pkvkBz 7n7dV6NDoDIVZuuh8ZlofB8TtmALqHdYP5oMJ8iQGLEZa75/DJkTDeYPw69kUJCA0Fb+ xa6esHTmGEQr6gLaFg23WWrmTXQonLiSYr03lss7ue6n0IHjNfW51Ib/u3AGCCCQS+2m jdaA==
- Arc-seal: i=1; a=rsa-sha256; t=1722081962; cv=none; d=strato.com; s=strato-dkim-0002; b=Hfskiy0TULzwEYbVPbUZVt2PLSWiBhpaXSy0lvOwwfKAwHskO0PrTGllgF51Hie5ZC NWmjxZimDFoKMuU45gtjKoKEccL2+yXfOUv5rePrzEVleFb+GMmLk5l1Z2fddpcoVpIp DrYUnDsP9d1Qd42ftS3pI/l1P1/z6aB234xW41XFGIr1IwRjzsTli10UQ4RyFb1V1/Xg w7T9HZTwcDo7Gw/JLng1/YrnaVJKl4dD35he+GqmcSrJQaKgF4FMX7ltYSoeyTBwmW6u hK9iex78+pKZsEGUfhNXEZSLAsCc2GzPV5r60ggeXdX3Txx/Qaesz0C/mwPUctVh5TvE S5zQ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1722081962; s=strato-dkim-0002; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=xXPYx/G02k2UiwVBa8yGqnaMuYf0Uad9yI2xijfzFNk=; b=nLKPMPh/pqu1uWnhXmh0qzzGczRDHBNl6iKSIYSDHs9YGBy0p4cQl0InWBV5rMtzDL YSed/CHwAiVyte/wvoe4ld/oTJlPYyD/DaBocbILWJ8yDNboan5XZHi/86yraeDESkEY Einh9737d4PAFMZb9E/y3Xc/mPbJ97ZzRxhtQ5qkuOIRSa3DurOK9Iqd9D/XSFIn6TxU J9i3mi1iR63hpmFfbiQ29kpClpryrk/mKXosNVQuhFlQ3ivUDEN86pNhv/NrRm+GN3d7 fVzAhoTq1mJoJtKaMtwFkgP97U2ocoZTB4M4JbQ4/A5xl54hF5APmdem7vqDP9K1DI4Q 7D5g==
- Dkim-signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1722081962; s=strato-dkim-0003; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=xXPYx/G02k2UiwVBa8yGqnaMuYf0Uad9yI2xijfzFNk=; b=6bZpUovgxBBudhO5mlhUA9sex021dNBx3K21mUxggVSy2sEPDENxtl5HkIN/WO+jkE E3xxS8Yn1GfPhqt58WDg==
> The timestamp of the file is not explicitly set by Pure-C when you save a
> file. Instead, it is assumed to be the same that Tgettime() returns. If
> Tgettime() returns something different (eg. because of fast-forward), those 2
> times will differ.
Correct me if I am wrong: Hatari uses the time returned by Tgettime()
whenever it updates a file in the Linux filesystem. Pure C does not
explicitly (later) set a new timestamp, i.e. the timestamp remains the one
set by Hatari based on Tgettime(). This is (with fast-forwarding) the
timestamp in the future.
If this is how it works, Hatari could (optionally) in a case where the
timestamp returned by Tgettime() is in the future replace this timestamp by
"now". That way in the Linux filesystem timestamps would never be in the
future. From the Atari (with fast-forwarding) perspective they would be in
the past, though. Maybe this would result in other issues?
> I already mentioned that behaviour long time ago, thinking that a 200hz timer
> should always be 200Hz, regardless of emulation speed. But probably this would
> break lots of timing dependant tricks.
Having this behavior with a (non-default) option is useful IMO. I doubt that
regular programs (other than demos and games) use timing tricks, so users
that use Hatari for other purposes than running games or demos might profit
from such an option.