23 __int64 frequency, counter;
25 QueryPerformanceFrequency((LARGE_INTEGER *)&frequency);
26 QueryPerformanceCounter((LARGE_INTEGER *)&counter);
28 return (
double)counter / (
double)frequency;
33 Sleep((
int)(t * 1000));
39 gettimeofday(&now,
NULL);
41 return now.tv_sec + now.tv_usec * 1
e-6;
58 int us = (
int)(t * 1e6);
69 const int h = (((
int)seconds) / (60 * 60));
70 const int m = (((
int)seconds) / 60) % 60;
71 const int s = (((
int)seconds) % 60);
72 const int r = (((
int)(seconds * 100)) % 100);
87 const int multipliers[] = {1, 60, 60 * 60, 24 * 60 * 60};
88 const int num_multiplies =
sizeof(multipliers) /
sizeof(*multipliers);
89 if (time_string.empty()) {
96 const int num_fraction_tokens = fraction_tokens.size();
97 if (num_fraction_tokens == 0) {
101 else if (fraction_tokens.size() == 1) {
105 else if (fraction_tokens.size() == 2) {
106 result = atof(fraction_tokens[1].c_str());
117 const int num_tokens = tokens.size();
118 if (num_tokens > num_multiplies) {
122 for (
int i = 0; i < num_tokens; ++i) {
123 result += atoi(tokens[num_tokens - i - 1].c_str()) * multipliers[i];
typedef double(DMatrix)[4][4]
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
pow(value.r - subtrahend, 2.0)") .do_static_compilation(true)
#define CCL_NAMESPACE_END
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
CCL_NAMESPACE_BEGIN string string_printf(const char *format,...)
void string_split(vector< string > &tokens, const string &str, const string &separators, bool skip_empty_tokens)
void time_sleep(double t)
double time_human_readable_to_seconds(const string &time_string)
string time_human_readable_from_seconds(const double seconds)
CCL_NAMESPACE_BEGIN double time_dt()