Add conversion operator to std::chrono::seconds
This commit is contained in:
@@ -94,5 +94,11 @@ namespace OpenVulkano
|
||||
totalSeconds = totalNanoseconds / 1000000000.0;
|
||||
return totalSeconds;
|
||||
}
|
||||
|
||||
operator std::chrono::seconds()
|
||||
{
|
||||
auto duration = std::chrono::duration<double>(GetTotalSeconds());
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(duration);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user