forked from bartvdbraak/blender
Cycles: Add utility function to query current value of scoped timer
This commit is contained in:
parent
12d527f327
commit
90299e4216
@ -37,7 +37,7 @@ public:
|
|||||||
~scoped_timer()
|
~scoped_timer()
|
||||||
{
|
{
|
||||||
if(value_ != NULL) {
|
if(value_ != NULL) {
|
||||||
*value_ = time_dt() - time_start_;
|
*value_ = get_time();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,6 +46,11 @@ public:
|
|||||||
return time_start_;
|
return time_start_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double get_time() const
|
||||||
|
{
|
||||||
|
return time_dt() - time_start_;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *value_;
|
double *value_;
|
||||||
double time_start_;
|
double time_start_;
|
||||||
|
Loading…
Reference in New Issue
Block a user