initial work to split into dart_filament and flutter_filament

This commit is contained in:
Nick Fisher
2024-04-30 12:07:26 +08:00
parent b81f34cd29
commit 8f9e309c34
1624 changed files with 165260 additions and 6619 deletions

View File

@@ -0,0 +1,30 @@
#include "TimeIt.hpp"
#if __cplusplus <= 199711L && !_WIN32
void Timer::reset()
{
clock_gettime(CLOCK_REALTIME, &beg_);
}
double Timer::elapsed()
{
clock_gettime(CLOCK_REALTIME, &end_);
return end_.tv_sec - beg_.tv_sec +
(end_.tv_nsec - beg_.tv_nsec) / 1000000000.;
}
#else
void Timer::reset()
{
beg_ = clock_::now();
}
double Timer::elapsed()
{
return std::chrono::duration_cast<second_>
(clock_::now() - beg_).count();
}
#endif