sdlxGetCurrentTime function time

int? sdlxGetCurrentTime()

Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coordinated Time (UTC).

\param ticks the SDL_Time to hold the returned tick count. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentTime(SDL_Time *ticks)

See also:

Implementation

int? sdlxGetCurrentTime() => ffi.using((arena) {
  final ticksPointer = arena<Int64>();
  if (!sdlGetCurrentTime(ticksPointer)) {
    return null;
  }
  return ticksPointer.value;
});