csaTime.cc
Go to the documentation of this file.
00001 /* csa_time.cc
00002  */
00003 #include "osl/game_playing/csaTime.h"
00004 #include <cstdio>
00005 
00006 const std::string osl::game_playing::CsaTime::
00007 getStart() const
00008 {
00009   std::string result(128,'\0');
00010   int sec = start.value()/1000;
00011 #ifdef _MSC_VER
00012   _snprintf(&result[0], result.size(), "%d", sec);
00013 #else
00014   snprintf(&result[0], result.size(), "%d", sec);
00015 #endif
00016   return result;
00017 }
00018 
00019 const std::string osl::
00020 game_playing::CsaTime::curruntTime()
00021 {
00022   std::string result(128,'\0');
00023   int sec = MilliSeconds::now().value()/1000;
00024 #ifdef _MSC_VER
00025   _snprintf(&result[0], result.size(), "%d", sec);
00026 #else
00027   snprintf(&result[0], result.size(), "%d", sec);
00028 #endif
00029   return result;
00030 }
00031 
00032 /* ------------------------------------------------------------------------- */
00033 // ;;; Local Variables:
00034 // ;;; mode:c++
00035 // ;;; c-basic-offset:2
00036 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines