Skip to content

Commit

Permalink
wayland: crop the timestamp so it fits in uint (#157)
Browse files Browse the repository at this point in the history
It's a client-local timestamp:

> timestamp with millisecond granularity; with an undefined base
  • Loading branch information
tarek-y-ismail authored Dec 11, 2024
2 parents 654dbde + ef30b99 commit 0a7d223
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mir-ci/mir_ci/wayland/wayland_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def _dispatch(self) -> None:
raise e

def timestamp(self) -> int:
return int(time.monotonic() * 1000)
# ensure the value fits in a `uint_t`
return int(time.monotonic() * 1000) & 0xFFFFFFFF

@abstractmethod
def registry_global(self, registry, id_num: int, iface_name: str, version: int) -> None:
Expand Down

0 comments on commit 0a7d223

Please sign in to comment.