Commit graph

5 commits

Author SHA1 Message Date
iddev5
f3e2b8b74c mach: add a standard way to access platform specific structs
This is done by adding platform.zig which is a file providing types like
``CoreType``, ``GpuDriverType`` and ``BackingTimerType``.
2022-05-23 01:03:43 -07:00
iddev5
e5050e856e mach: Timer: wasm implementation using performance.now() 2022-05-23 01:03:43 -07:00
iddev5
9b7b8be285 mach: Timer: mark all wrapper functions as inline 2022-05-23 01:03:43 -07:00
iddev5
ccb1063e3f mach: wasm: Add initial framework bones 2022-05-22 11:44:21 -07:00
iddev5
3bb45c75a1 mach: introduce cross platform Timer abstraction
This Timer uses std.time.Timer as backing timer in native platforms, and
will use custom timers for special platforms (wasm, android?, ios?).

Unlike std.time.Timer, its primary API is focused on floats. Also meant
to provides some convenient functions alongside base ones.

Follows std.time.Timer API, but methods by default return f32 i.e
non-precise variant with precise variants available returning u64.
2022-05-17 23:56:41 -07:00