mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add performance tests for CEF V8 methods (issue #484).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@880 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -69,6 +69,18 @@ CEF_EXPORT int cef_time_from_timet(time_t time, cef_time_t* cef_time);
|
||||
CEF_EXPORT int cef_time_to_doublet(const cef_time_t* cef_time, double* time);
|
||||
CEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time);
|
||||
|
||||
///
|
||||
// Retrieve the current system time.
|
||||
//
|
||||
CEF_EXPORT int cef_time_now(cef_time_t* cef_time);
|
||||
|
||||
///
|
||||
// Retrieve the delta in milliseconds between two time values.
|
||||
//
|
||||
CEF_EXPORT int cef_time_delta(const cef_time_t* cef_time1,
|
||||
const cef_time_t* cef_time2,
|
||||
long long* delta);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -494,6 +494,18 @@ class CefTime : public CefStructBase<CefTimeTraits> {
|
||||
cef_time_to_doublet(this, &time);
|
||||
return time;
|
||||
}
|
||||
|
||||
// Set this object to now.
|
||||
void Now() {
|
||||
cef_time_now(this);
|
||||
}
|
||||
|
||||
// Return the delta between this object and |other| in milliseconds.
|
||||
int64 Delta(const CefTime& other) {
|
||||
int64 delta = 0;
|
||||
cef_time_delta(this, &other, &delta);
|
||||
return delta;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user