diff --git a/include/time/seadTickSpan.h b/include/time/seadTickSpan.h index 52d76247f..666e6e66d 100644 --- a/include/time/seadTickSpan.h +++ b/include/time/seadTickSpan.h @@ -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; diff --git a/include/time/seadTickTime.h b/include/time/seadTickTime.h index 497f6b367..6fd3a40ae 100644 --- a/include/time/seadTickTime.h +++ b/include/time/seadTickTime.h @@ -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 @@ -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; } diff --git a/modules/src/thread/nin/seadEventNin.cpp b/modules/src/thread/nin/seadEventNin.cpp index 6c79ff1df..463b6576d 100644 --- a/modules/src/thread/nin/seadEventNin.cpp +++ b/modules/src/thread/nin/seadEventNin.cpp @@ -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() diff --git a/modules/src/thread/nin/seadThreadNin.cpp b/modules/src/thread/nin/seadThreadNin.cpp index c508b0704..d80463fcc 100644 --- a/modules/src/thread/nin/seadThreadNin.cpp +++ b/modules/src/thread/nin/seadThreadNin.cpp @@ -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 diff --git a/modules/src/time/seadTickSpan.cpp b/modules/src/time/seadTickSpan.cpp index 0b8eb9184..fc4cde0c6 100644 --- a/modules/src/time/seadTickSpan.cpp +++ b/modules/src/time/seadTickSpan.cpp @@ -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