KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have some arbitrary epoch, like July 13, 1988. Essentially I want to measure the time relative to this. I was thinking of writing a custom clock class, so that I could write code like this: using std::chrono; time_point<My_Clock> tp; std::cout << duration_cast<seconds>(tp.time_since_epoch()).count() << std::endl; Is this possible? If not, what's the cleanest way to accomplish this?
Tags (comma-separated)
Save Edits
Cancel