我記錄時間戳在我的程序與下面的代碼塊: // Taken at relevant time
m.timestamp = std::chrono::high_resolution_clock::now().time_since_epoch();
// After work is done
std::size_t secs = std::chrono::duration_cast <std:
參照Obtaining Time in milliseconds 時差爲什麼以下代碼產生零作爲輸出? int main()
{
steady_clock::time_point t1 = steady_clock::now();
//std::this_thread::sleep_for(std::chrono::milliseconds(1500));
stead