-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add posix time formatting #225
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
Conversation
libc.time(&time) | ||
let result = libc.ctime(&time) | ||
|
||
return String(cString: result) |
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.
Shouldn't return type be Double
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.
okay I see its not unix ts
7b5f1bd
to
99f893a
Compare
After studying this topic I think it would be better to Use Thread Safe Functions |
Probably, yes. Currently we are single thread, but that will change as Swift gains concurrency primitives. |
Done, use TS functions and added error handling. |
@swift-ci Please test |
test are passing, shall we merge it? |
Please 👍🏻 |
Add posix functions for getting and formatting time.
This function is required in RP #122.