summaryrefslogtreecommitdiff
path: root/src/guiChatConsole.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2016-03-06 14:31:16 -0500
committerShadowNinja <shadowninja@minetest.net>2017-04-28 14:43:18 -0400
commitb662a4577d692329b9ca83525e6039f2ddcd1ac1 (patch)
treed1f59d395f47320149560bef4278dc0e6a194473 /src/guiChatConsole.cpp
parent7f4cdbcbe9b5b4655c2c5eba2043628487668e24 (diff)
downloadminetest-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/guiChatConsole.cpp')
-rw-r--r--src/guiChatConsole.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/guiChatConsole.cpp b/src/guiChatConsole.cpp
index bea5571f4..b3c119555 100644
--- a/src/guiChatConsole.cpp
+++ b/src/guiChatConsole.cpp
@@ -55,7 +55,7 @@ GUIChatConsole::GUIChatConsole(
m_client(client),
m_menumgr(menumgr),
m_screensize(v2u32(0,0)),
- m_animate_time_old(0),
+ m_animate_time_old(porting::getTimeMs()),
m_open(false),
m_close_on_enter(false),
m_height(0),
@@ -71,8 +71,6 @@ GUIChatConsole::GUIChatConsole(
m_font(NULL),
m_fontsize(0, 0)
{
- m_animate_time_old = getTimeMs();
-
// load background settings
s32 console_alpha = g_settings->getS32("console_alpha");
m_background_color.setAlpha(clamp_u8(console_alpha));
@@ -124,7 +122,7 @@ void GUIChatConsole::openConsole(f32 scale)
m_desired_height_fraction = scale;
m_desired_height = scale * m_screensize.Y;
reformatConsole();
- m_animate_time_old = getTimeMs();
+ m_animate_time_old = porting::getTimeMs();
IGUIElement::setVisible(true);
Environment->setFocus(this);
m_menumgr->createdMenu(this);
@@ -212,7 +210,7 @@ void GUIChatConsole::draw()
}
// Animation
- u32 now = getTimeMs();
+ u64 now = porting::getTimeMs();
animate(now - m_animate_time_old);
m_animate_time_old = now;