Download ml-stable-diffusion/mlx/examples/cpp/timer.h from Fahad-S/FastVLM_SANA: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/examples/cpp/timer.h
- Command line
-
hf download hf://Fahad-S/FastVLM_SANA/ml-stable-diffusion/mlx/examples/cpp/timer.h
-
curl -L -o timer.h https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/examples/cpp/timer.h
332 Bytes
| // Copyright © 2023 Apple Inc. | |
| namespace timer { | |
| using namespace std::chrono; | |
| template <typename R, typename P> | |
| inline double seconds(duration<R, P> x) { | |
| return duration_cast<nanoseconds>(x).count() / 1e9; | |
| } | |
| inline auto time() { | |
| return high_resolution_clock::now(); | |
| } | |
| } // namespace timer | |