Skip to content

Conversation

@lePereT
Copy link

@lePereT lePereT commented Mar 2, 2022

Adds Luaposix as a source, it's structured subtly differently to either syscall or unix, so there is some repeated code here.

local has_posix_time, posix_time = pcall(require, "posix.time")
if has_posix_time and posix_time.clock_gettime then
local clock_id = posix_time.CLOCK_REALTIME
local function timespec_to_number(timespec)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't pull out this function as I didn't want useless code in scope for the methods below

Copy link
Owner

@daurnimator daurnimator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update docs in doc/gettime.md

Also should add it to the CI matrix; though I need to update from travis to github actions.


Why do you want to use luaposix instead of any of the other existing options?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants