Skip to content
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

Mac OS build/link times are not displayed correctly. #6

Closed
moshohayeb opened this issue Apr 4, 2014 · 4 comments
Closed

Mac OS build/link times are not displayed correctly. #6

moshohayeb opened this issue Apr 4, 2014 · 4 comments

Comments

@moshohayeb
Copy link

clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
Compile time: usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

Linking: bin/release/xxx
Link time: usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

Making symlink: xxx -> bin/release/xxx
Total build time: usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

@mbcrawfo mbcrawfo added the bug label Apr 4, 2014
@mbcrawfo
Copy link
Owner

mbcrawfo commented Apr 4, 2014

Unfortunately I don't have a Mac available to test with. If a fix is possible that will work with both the Mac and Linux versions of date, anyone is welcome to submit a pull request with the fix. If the fix is going to require some changes that are Mac-specific, I'd encourage a Mac user to make a Mac-specific fork.

@mbcrawfo
Copy link
Owner

mbcrawfo commented Apr 7, 2014

I was able to do some testing with a friend's Mac. It doesn't look like the OSX version of date supports getting the number of seconds since epoch, or converting seconds to another time format. I was able to find a solution using awk to get the elapsed seconds, but not a way to format it to HH:MM:SS. You can find a patch here: http://pastebin.com/vDSX8zXB

@moshohayeb
Copy link
Author

Works fine, thanks :)

@MarcusJohnson91
Copy link

Why not just use the time command?

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

No branches or pull requests

3 participants