summaryrefslogtreecommitdiff
path: root/src/chat.cpp
Commit message (Expand)AuthorAge
* Suppress MSVC warning in chat.cppgregorycu2015-01-25
* Add paste command (Ctrl-V) in GUIChatConsoleKahrl2014-12-10
* Fix typo in comment in chat.cppKahrl2014-09-14
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Fix nick completionPilzAdam2013-04-05
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Chat console, including a number of rebases and modifications.Kahrl2012-03-10
n> #include "irrlichttypes.h" /* Get a millisecond counter value. Precision depends on implementation. Overflows at any value above 10000000. Implementation of this is done in: Normal build: main.cpp Server build: servermain.cpp */ enum TimePrecision { PRECISION_SECONDS = 0, PRECISION_MILLI, PRECISION_MICRO, PRECISION_NANO }; extern u32 getTimeMs(); extern u32 getTime(TimePrecision prec); /* Timestamp stuff */ #include <time.h> #include <string> inline std::string getTimestamp() { time_t t = time(NULL); // This is not really thread-safe but it won't break anything // except its own output, so just go with it. struct tm *tm = localtime(&t); char cs[20]; strftime(cs, 20, "%H:%M:%S", tm); return cs; } #endif