Skip to content

Instantly share code, notes, and snippets.

@xaqq
Created January 10, 2015 00:49
Show Gist options
  • Save xaqq/0533f29d04726895fcfe to your computer and use it in GitHub Desktop.
Save xaqq/0533f29d04726895fcfe to your computer and use it in GitHub Desktop.
#include <chrono>
#include <iostream>
std::chrono::milliseconds operator""_ms(unsigned long long v)
{
return std::chrono::milliseconds((long int)v);
}
int main()
{
auto t = 150_ms;
std::cout << t.count() << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment