Upstream tarball 9964
[amule.git] / src / GetTickCount.h
blob80b0d2e9c84476710a27f0386c4b08b739af60b0
1 //
2 // This file is part of the aMule Project.
3 //
4 // Copyright (c) 2003-2008 Alo Sarv ( madcat_@users.sourceforge.net )
5 // Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org )
6 // Copyright (c) 2002-2008 Timo Kujala ( tiku@users.sourceforge.net )
7 //
8 // Any parts of this program derived from the xMule, lMule or eMule project,
9 // or contributed by third-party developers are copyrighted by their
10 // respective authors.
12 // This program is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation; either version 2 of the License, or
15 // (at your option) any later version.
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #ifndef GETTICKCOUNT_H
28 #define GETTICKCOUNT_H
30 #include "Types.h" // Needed for uint32
32 #ifndef _WIN32
33 uint32 GetTickCount();
34 #else
35 #ifndef _MSC_VER
36 #include <winbase.h> // Do_not_auto_remove
37 #endif
38 // System GetTickcount is lowres, so use fullres
39 #define GetTickCount GetTickCountFullRes
40 // GetTickCount64 is a system function in Vista so rename it
41 #define GetTickCount64 GetTickCount_64
42 #endif
44 // Ideally, same than GetTickCount.
45 // However, on GUI, GetTickCount does only work in
46 // 20 msecs increment, and some classes need better.
48 uint32 GetTickCountFullRes();
50 uint64 GetTickCount64();
52 // Functions used to init the timer on GUI
54 void StartTickTimer();
56 void StopTickTimer();
58 // A cheap global time (in s) without any function calls updated in OnCoreTimer
59 extern uint32 TheTime;
61 #endif // GETTICKCOUNT_H
62 // File_checked_for_headers