3 ms·
Hi! I'm Chris Horvath, the author of Flicks, formerly of Facebook/Oculus, currently at Cruise Automation. I'm happy to answer any questions about my most-talked
by blackencino 7y ago
Hi! I'm Chris Horvath, the author of Flicks, formerly of Facebook/Oculus, currently at Cruise Automation. I'm happy to answer any questions about my most-talked-about-single-line-of-code.
- enriquto 7y agocan you point us to that single line of code? is it stored in a git somewhere?
- speps 7y agohttps://github.com/OculusVR/Flicks https://github.com/OculusVR/Flicks
- hoseja 7y agoIt's the using flicks = std::chrono::duration<std::chrono::nanoseconds::rep, std::ratio<1, 705600000>>;
- blackencino 7y agoThat’s the one!!!
- chrisweekly 7y ago"A flick (frame-tick) is a very small unit of time. It is 1/705600000 of a second, exactly. 1 flick = 1/705600000 second This unit of time is the smallest time unit which is LARGER than a nanosecond, and can in integer quantities exactly represent a single frame duration for 24 Hz, 25 Hz, 30 Hz, 48 Hz, 50 Hz, 60 Hz, 90 Hz, 100 Hz, 120 Hz, and also 1/1000 divisions of each, as well as a single sample duration for 8 kHz, 16 kHz, 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz, 48 kHz, 88.2 kHz, 96 kHz, and 192kHz, as well as the NTSC frame durations for 24 (1000/1001) Hz, 30 * (1000/1001) Hz, 60 * (1000/1001) Hz, and 120 * (1000/1001) Hz.* That above was one hell of a run-on sentence, but it's strictly and completely correct in its description of the unit. This makes flicks suitable for use via std::chrono::duration and std::ratio for doing timing work against the system high resolution clock, which is in nanoseconds, but doesn't get slightly out of sync when doing common frame rates." https://github.com/OculusVR/Flicks https://github.com/OculusVR/Flicks