зеркало из https://github.com/mozilla/gecko-dev.git
Fixing Unix warnings. r=harishd
This commit is contained in:
Родитель
d7e228ed78
Коммит
88f2f647e9
|
@ -5,8 +5,6 @@
|
|||
#include "prlog.h"
|
||||
#include "nsDeque.h"
|
||||
|
||||
static double gTicks = 1.0e-7;
|
||||
|
||||
#ifdef XP_MAC
|
||||
#define R__MAC
|
||||
#endif
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
double gTicks = 1.0e-7;
|
||||
|
||||
Stopwatch::Stopwatch() {
|
||||
|
||||
#ifdef R__UNIX
|
||||
|
@ -25,7 +27,7 @@ Stopwatch::Stopwatch() {
|
|||
Stopwatch::~Stopwatch() {
|
||||
EState* state = 0;
|
||||
if (mSavedStates) {
|
||||
while (state = (EState*) mSavedStates->Pop()) {
|
||||
while ((state = (EState*) mSavedStates->Pop())) {
|
||||
delete state;
|
||||
}
|
||||
delete mSavedStates;
|
||||
|
@ -220,6 +222,11 @@ void Stopwatch::Print(void) {
|
|||
int min = int(realt / 60);
|
||||
realt -= min * 60;
|
||||
int sec = int(realt);
|
||||
#ifdef MOZ_PERF_METRICS
|
||||
RAPTOR_STOPWATCH_TRACE(("Real time %d:%d:%d, CP time %.3f", hours, min, sec, CpuTime()));
|
||||
#else
|
||||
printf("Real time %d:%d:%d, CP time %.3f", hours, min, sec, CpuTime());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче