diff --git a/Runtime/Input/CRumbleGenerator.cpp b/Runtime/Input/CRumbleGenerator.cpp index 7887c405d..ce2ee350a 100644 --- a/Runtime/Input/CRumbleGenerator.cpp +++ b/Runtime/Input/CRumbleGenerator.cpp @@ -24,8 +24,9 @@ void CRumbleGenerator::Update(float dt) { if (!b_tp) { b_tp = true; s_tp = now; - } else + } else { ms = std::chrono::duration_cast(now - s_tp).count(); + } #endif if (!xf0_24_disabled) { @@ -38,7 +39,7 @@ void CRumbleGenerator::Update(float dt) { if (xe0_commandArray[i] != EMotorState::Stop) { #if PWM_MONITOR s_tp = now; - printf("%lldms ON\n", ms); + fmt::print(FMT_STRING("{}ms ON\n"), ms); #endif xe0_commandArray[i] = EMotorState::Stop; updated = true; @@ -50,7 +51,7 @@ void CRumbleGenerator::Update(float dt) { if (xe0_commandArray[i] != EMotorState::Rumble) { #if PWM_MONITOR s_tp = now; - printf("%lldms Off\n", ms); + fmt::print(FMT_STRING("{}ms Off\n"), ms); #endif xe0_commandArray[i] = EMotorState::Rumble; updated = true; @@ -62,7 +63,7 @@ void CRumbleGenerator::Update(float dt) { if (xe0_commandArray[i] != EMotorState::Stop) { #if PWM_MONITOR s_tp = now; - printf("%lldms ON\n", ms); + fmt::print(FMT_STRING("{}ms ON\n"), ms); #endif xe0_commandArray[i] = EMotorState::Stop; updated = true;