Skip to content

Lua: timestamp in millis/ns #10282

@mindyor

Description

@mindyor

Description:
We want to record timestamps in a Lua filter so that we know when requests and responses occur (and eventually derive the duration).
It appears Lua doesn't have a function to do this - os.time provides current time, but only at seconds, not millis or ns. os.clock provides a timestamp, but only for time spent in Lua.

Maybe something like request_handle:timestamp?

Relevant Links:
https://stackoverflow.com/questions/463101/lua-current-time-in-milliseconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/luaenhancementFeature requests. Not bugs or questions.stalestalebot believes this issue/PR has not been touched recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions