diff options
author | ShadowNinja <shadowninja@minetest.net> | 2016-03-06 14:31:16 -0500 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2017-04-28 14:43:18 -0400 |
commit | b662a4577d692329b9ca83525e6039f2ddcd1ac1 (patch) | |
tree | d1f59d395f47320149560bef4278dc0e6a194473 /src/client.cpp | |
parent | 7f4cdbcbe9b5b4655c2c5eba2043628487668e24 (diff) | |
download | minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.tar.gz minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.tar.bz2 minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.zip |
Clean up getTime helpers
This increases size of the getTime return values to 64 bits.
It also removes the TimeGetter classes since the getTime functions
are now very precise.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp index 019693f1d..43b58d819 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1618,7 +1618,7 @@ float Client::mediaReceiveProgress() typedef struct TextureUpdateArgs { IrrlichtDevice *device; gui::IGUIEnvironment *guienv; - u32 last_time_ms; + u64 last_time_ms; u16 last_percent; const wchar_t* text_base; ITextureSource *tsrc; @@ -1634,7 +1634,7 @@ void texture_update_progress(void *args, u32 progress, u32 max_progress) u32 time_ms = targs->last_time_ms; if (cur_percent != targs->last_percent) { targs->last_percent = cur_percent; - time_ms = getTimeMs(); + time_ms = porting::getTimeMs(); // only draw when the user will notice something: do_draw = (time_ms - targs->last_time_ms > 100); } @@ -1692,7 +1692,7 @@ void Client::afterContentReceived(IrrlichtDevice *device) TextureUpdateArgs tu_args; tu_args.device = device; tu_args.guienv = guienv; - tu_args.last_time_ms = getTimeMs(); + tu_args.last_time_ms = porting::getTimeMs(); tu_args.last_percent = 0; tu_args.text_base = wgettext("Initializing nodes"); tu_args.tsrc = m_tsrc; |