[haiku-development] Re: [PATCH] Add microsecond resolution to BTime

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 09 Oct 2008 20:34:10 +0200 CEST

"Stephen Deken" <stephen.deken@xxxxxxxxx> wrote:
> This is a patch to BTime that gives it a microsecond resolution.
> Since BTime is (I assume) present in BeOS R5, and because the goal of
> Haiku R1 is to preserve binary compatibility with BeOS R5, I've
> guarded the changes with HAIKU_TARGET_PLATFORM_HAIKU, which is the
> closest I could find to HAIKU_BREAK_COMPATIBILITY.
> 
> This patch is (will be) needed to allow the clock to have a smoothly
> sweeping second hand (as a preference in the new clock app, which
> isn't ready yet).  It does not appear to have any adverse side effect
> on the rest of the OS.

AFAIK BTime is a private Haiku only class - it's always compiled into 
the app that uses it (hence the shared folder), so you can freely 
change it without fearing incompatibilities with BeOS.
I would also make the microsecond parameter of the constructor 
optional, I think.

BTW when doing changes like this in general, it's better to use 
__HAIKU__ instead of HAIKU_TARGET_PLATFORM_HAIKU, as the latter is only 
defined within Haiku's own build system, while the former is always 
available.

Bye,
   Axel.


Other related posts: