-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time.now #404
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #404 +/- ##
==========================================
+ Coverage 71.75% 71.77% +0.02%
==========================================
Files 107 108 +1
Lines 7910 7923 +13
==========================================
+ Hits 5676 5687 +11
- Misses 2125 2127 +2
Partials 109 109 ☔ View full report in Codecov by Sentry. |
use anyhow::Result; | ||
|
||
pub fn now() -> Result<u64> { | ||
Ok(SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hell yeah UNIX EPOCH 😎
Is there a reason (for windows folks) to do Windows EPOCH on windows hosts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, tbh I need to make a timestamp to epoch eldritch function and vice versa to make this easier for ppl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - One question about windows epoch but i'm pretty happy with just UNIX epoch.
What type of PR is this?
/kind documentation
/kind feature
/kind eldritch-function
What this PR does / why we need it:
Adds
time.now()
to return local system timeWhich issue(s) this PR fixes:
Fixes #76