Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/time/seadTickSpan.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class TickSpan
TickSpan(s64 span = 0) : mSpan(span) {}

s64 toS64() const { return mSpan; }
s64 toTicks() const { return mSpan; }

s64 toNanoSeconds() const;

Expand Down
6 changes: 3 additions & 3 deletions include/time/seadTickTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TickTime
u64 toTicks() const { return mTick; }

#ifdef NNSDK
void setNow() { mTick = nn::os::GetSystemTick(); }
void setNow() { mTick = nn::os::GetSystemTick().value; }
#else
void setNow();
#endif
Expand All @@ -28,13 +28,13 @@ class TickTime

TickTime& operator+=(const TickSpan& span)
{
mTick += span.toTicks();
mTick += span.toS64();
return *this;
}

TickTime& operator-=(const TickSpan& span)
{
mTick -= span.toTicks();
mTick -= span.toS64();
return *this;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/src/thread/nin/seadEventNin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool Event::wait(TickSpan duration)
#ifdef SEAD_DEBUG
SEAD_ASSERT_MSG(mInitialized, "Event is not initialized.");
#endif
return nn::os::TimedWaitLightEvent(&mEventInner, nn::os::ConvertToTimeSpan(duration.toTicks()));
return nn::os::TimedWaitLightEvent(&mEventInner, nn::os::ConvertToTimeSpan(duration.toS64()));
}

void Event::setSignal()
Expand Down
2 changes: 1 addition & 1 deletion modules/src/thread/nin/seadThreadNin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void Thread::yield()

void Thread::sleep(TickSpan howLong)
{
nn::os::SleepThread(nn::os::ConvertToTimeSpan(howLong.toTicks()));
nn::os::SleepThread(nn::os::ConvertToTimeSpan(howLong.toS64()));
}

uintptr_t Thread::getStackCheckStartAddress_() const
Expand Down
2 changes: 1 addition & 1 deletion modules/src/time/seadTickSpan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace sead
{
#ifdef NNSDK
const s64 TickSpan::cFrequency = nn::os::GetSystemTickFrequency();
const s64 TickSpan::cFrequency = nn::os::GetSystemTickFrequency().value;
#else
#error "Unknown platform"
#endif
Expand Down