Skip to content

fix(src): fix getProcessStartingTimestamp function#1134

Merged
jmcook1186 merged 1 commit intoGreen-Software-Foundation:mainfrom
kariya-mitsuru:fix-process-starting-timestamp
May 6, 2025
Merged

fix(src): fix getProcessStartingTimestamp function#1134
jmcook1186 merged 1 commit intoGreen-Software-Foundation:mainfrom
kariya-mitsuru:fix-process-starting-timestamp

Conversation

@kariya-mitsuru
Copy link
Copy Markdown
Contributor

Types of changes

  • Enhancement (project structure, spelling, grammar, formatting)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

A description of the changes proposed in the Pull Request

The getProcessStartingTimestamp function was using hrtime but wasn't correctly calculating the process start time.
Therefore, modify it to use uptime for the calculation instead.

Additionally, change it to use the standard Date object instead of luxon, as the rich features provided by luxon weren't necessary.

Note: When hrtime is called without arguments, it returns the elapsed time from some point (not specified in the API), rather than returning the value of the process start time.

The getProcessStartingTimestamp function was using hrtime but wasn't
correctly calculating the process start time.
Therefore, modify it to use uptime for the calculation instead.

Additionally, change it to use the standard Date object instead of
luxon, as the rich features provided by luxon weren't necessary.

Signed-off-by: Mitsuru Kariya <mitsuru.kariya@nttdata.com>
Copy link
Copy Markdown
Contributor

@jmcook1186 jmcook1186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok to me - thanks!

@jmcook1186 jmcook1186 merged commit 33d37c7 into Green-Software-Foundation:main May 6, 2025
1 check passed
@github-project-automation github-project-automation bot moved this to Done in IF May 6, 2025
@kariya-mitsuru kariya-mitsuru deleted the fix-process-starting-timestamp branch May 6, 2025 10:37
@github-actions github-actions bot mentioned this pull request May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants