This repository was archived by the owner on Jun 18, 2021. It is now read-only.
Repository navigation
Conversation
Obtain the start time via as a time_t via time() so we can do a simple uptime calculation later on via difftime().
richardlau
reviewed
Apr 28, 2017
| localtime_r(&time_val.tv_sec, &loadtime_tm_struct); | ||
| #endif | ||
| load_time = mktime(&loadtime_tm_struct); | ||
| time(&load_time); |
Member
There was a problem hiding this comment.
Does it matter that loadtime_tm_struct and load_time may be different after this change?
Contributor
|
Converting the Windows SYSTEMTIME structure to the tm struct required by mktime() is a pain and would need quite a bit of extra code. @richardlau is right that by getting the time again we could have ticked over a second, but I don't think it matters here. We use load_time for the average CPU consumption, which is an approximation anyway. LGTM |
Contributor
|
Landing this shortly |
rnchamberlain
pushed a commit
that referenced
this pull request
May 4, 2017
Obtain the start time via as a time_t via time() so we can do a simple uptime calculation later on via difftime(). PR-URL: #85 Reviewed-By: Richard Chamberlain <richard_chamberlain@uk.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Contributor
|
Landed as 1b62e31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Obtain the start time via as a time_t via time() so we can do a
simple uptime calculation later on via difftime().
This should resolve issue #83.