mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
move "double time" code into State from Timer
Ideally the statesave format could be changed to just store a u64 in the future
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
namespace Common
|
||||
@ -24,19 +23,9 @@ public:
|
||||
|
||||
static u64 GetLocalTimeSinceJan1970();
|
||||
|
||||
// Returns biased system timestamp as double
|
||||
// It is very unlikely you want to use this in new code; ideally we can remove it completely.
|
||||
static double GetSystemTimeAsDouble();
|
||||
// Formats a timestamp from GetSystemTimeAsDouble() into a date and time string
|
||||
static std::string SystemTimeAsDoubleToString(double time);
|
||||
|
||||
static void IncreaseResolution();
|
||||
static void RestoreResolution();
|
||||
|
||||
// Arbitrarily chosen value (38 years) that is subtracted in GetSystemTimeAsDouble()
|
||||
// to increase sub-second precision of the resulting double timestamp
|
||||
static constexpr int DOUBLE_TIME_OFFSET = (38 * 365 * 24 * 60 * 60);
|
||||
|
||||
private:
|
||||
u64 m_start_ms{0};
|
||||
u64 m_end_ms{0};
|
||||
|
Reference in New Issue
Block a user