• Aravind Anbudurai's avatar
    Make AutoTimer work with std::chrono::duration instead of seconds with type double · 0b14cc4f
    Aravind Anbudurai authored
    Summary:
    Currently, AutoTimer outputs duration as a double with seconds as units.
    This is limiting and I'm making it return std::chrono::duration. Users can specify the type with DurationType.
    
    This is needed for me because the library that I am going to use inside the callback I pass in using chrono::duration and it feels hacky to go from duration -> double -> duration.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D3506557
    
    fbshipit-source-id: 0a5e9e16181bfac3a10df6a253716c0499cff5df
    0b14cc4f
AutoTimer.h 4.3 KB