Populous: The Beginning Script 3
1.0.0
Documentation for Populous Script 3 engine
script3_profiler.h
Go to the documentation of this file.
1
#pragma once
2
#include "Game.h"
3
#include "Pop3Debug.h"
4
5
class
script3_profiler
6
{
7
public
:
8
script3_profiler
(
const
std::string & name) :
_start
(0)
9
{
10
_name
= name;
11
}
12
script3_profiler
() :
_start
(0) { }
13
14
void
start
()
15
{
16
_start
= GetTickCount64();
17
}
18
19
const
unsigned
long
long
time_taken
()
20
{
21
return
GetTickCount64() -
_start
;
22
}
23
24
void
log
(
const
std::string & file,
unsigned
int
line)
25
{
26
Pop3Debug::trace(
"%s(%d) (%s): Time elapsed %d ms"
, file.c_str(), line,
_name
.c_str(),
time_taken
());
27
this->
start
();
28
}
29
private
:
30
unsigned
long
long
_start
;
31
std::string
_name
;
32
};
script3_profiler::start
void start()
Definition:
script3_profiler.h:14
script3_profiler::_name
std::string _name
Definition:
script3_profiler.h:31
script3_profiler::log
void log(const std::string &file, unsigned int line)
Definition:
script3_profiler.h:24
script3_profiler::script3_profiler
script3_profiler(const std::string &name)
Definition:
script3_profiler.h:8
script3_profiler::time_taken
const unsigned long long time_taken()
Definition:
script3_profiler.h:19
script3_profiler::_start
unsigned long long _start
Definition:
script3_profiler.h:30
script3_profiler::script3_profiler
script3_profiler()
Definition:
script3_profiler.h:12
script3_profiler
Definition:
script3_profiler.h:5
script3_profiler.h
Generated by
1.8.15