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,32 @@
#ifndef TIMEIT_H_
#define TIMEIT_H_
#pragma once
#if __cplusplus <= 199711L && !_WIN32
#include <ctime>
#else
#include <chrono>
#endif
class Timer
{
public:
Timer() { reset(); }
void reset();
double elapsed();
private:
#if __cplusplus <= 199711L && !_WIN32
timespec beg_, end_;
#else
typedef std::chrono::high_resolution_clock clock_;
typedef std::chrono::duration<double, std::ratio<1> > second_;
std::chrono::time_point<clock_> beg_;
#endif
};
#endif // TIMEIT_H_