All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
csaTime.cc
Go to the documentation of this file.
1 /* csa_time.cc
2  */
4 #include <cstdio>
5 
6 const std::string osl::game_playing::CsaTime::
7 getStart() const
8 {
9  std::string result(128,'\0');
10  int sec = start.value()/1000;
11 #ifdef _MSC_VER
12  _snprintf(&result[0], result.size(), "%d", sec);
13 #else
14  snprintf(&result[0], result.size(), "%d", sec);
15 #endif
16  return result;
17 }
18 
19 const std::string osl::
21 {
22  std::string result(128,'\0');
23  int sec = MilliSeconds::now().value()/1000;
24 #ifdef _MSC_VER
25  _snprintf(&result[0], result.size(), "%d", sec);
26 #else
27  snprintf(&result[0], result.size(), "%d", sec);
28 #endif
29  return result;
30 }
31 
32 /* ------------------------------------------------------------------------- */
33 // ;;; Local Variables:
34 // ;;; mode:c++
35 // ;;; c-basic-offset:2
36 // ;;; End: