mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.cosmetics
git-svn-id: svn://ultimatepp.org/upp/trunk@14328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
82bc1a6b85
commit
d05e6fa8bf
3 changed files with 15 additions and 8 deletions
|
|
@ -209,7 +209,7 @@ int msecs(int prev)
|
|||
|
||||
void TimeStop::Reset()
|
||||
{
|
||||
starttime = GetTickCount();
|
||||
starttime = usecs();
|
||||
}
|
||||
|
||||
TimeStop::TimeStop()
|
||||
|
|
@ -219,8 +219,12 @@ TimeStop::TimeStop()
|
|||
|
||||
String TimeStop::ToString() const
|
||||
{
|
||||
dword time = Elapsed();
|
||||
return Format("%d.%03d", int(time / 1000), int(time % 1000));
|
||||
double time = Elapsed();
|
||||
if(time < 1e3)
|
||||
return String() << time << " us";
|
||||
if(time < 1e6)
|
||||
return String() << time / 1e3 << " ms";
|
||||
return String() << time / 1e6 << " s";
|
||||
}
|
||||
|
||||
int RegisterTypeNo__(const char *type)
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ int64 usecs(int64 prev = 0);
|
|||
int msecs(int prev = 0);
|
||||
|
||||
class TimeStop : Moveable<TimeStop> {
|
||||
dword starttime;
|
||||
double starttime;
|
||||
|
||||
public:
|
||||
dword Elapsed() const { return GetTickCount() - starttime; }
|
||||
double Seconds() const { return (double)Elapsed() / 1000; }
|
||||
double Elapsed() const { return usecs() - starttime; }
|
||||
double Seconds() const { return (double)Elapsed() / 1000000; }
|
||||
String ToString() const;
|
||||
void Reset();
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ void RectTracker::DrawRect(Draw& w, Rect r)
|
|||
|
||||
void RectTracker::Paint(Draw& w)
|
||||
{
|
||||
{
|
||||
TIMESTOP("DrawImage");
|
||||
w.DrawImage(0, 0, master_image);
|
||||
}
|
||||
w.Clip(clip & GetMaster().GetSize());
|
||||
Rect r = rect;
|
||||
if(ty < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue