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

coreinit: add stopwatch.h and stopwatchatomic.h #370

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

capitalistspz
Copy link
Contributor

Adds the stopwatch functions and structs.
Named what should be OSStopWatch to OSStopWatchAtomic to avoid confusion with OSStopwatch

Copy link
Contributor

@GaryOderNichts GaryOderNichts left a comment

Choose a reason for hiding this comment

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

Just some style nitpicks. Also try to use 3 spaces for indentation like the other headers.

* Get the current time on the stopwatch
* \returns current time on stopwatch
*/
OSTime OSStopWatchLap(OSStopWatchAtomic *stopWatch);
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing newline after the return type.


typedef struct OSStopWatchAtomic OSStopWatchAtomic;

struct OSStopWatchAtomic {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
struct OSStopWatchAtomic {
struct OSStopWatchAtomic
{


typedef struct OSStopwatch OSStopwatch;

struct OSStopwatch {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
struct OSStopwatch {
struct OSStopwatch
{

//! Lock
OSSpinLock lock;
//! Tag
char* name;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
char* name;
const char* name;

Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com>
@GaryOderNichts GaryOderNichts merged commit 1da1402 into devkitPro:master Jun 8, 2024
1 check passed
Maschell pushed a commit to Maschell/wut that referenced this pull request Jun 10, 2024
* coreinit: add stopwatch.h and stopwatchatomic.h

* Formatting

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

Successfully merging this pull request may close these issues.

2 participants