projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix ADML component test
[anna.git]
/
source
/
time
/
functions.cpp
diff --git
a/source/time/functions.cpp
b/source/time/functions.cpp
index
fe6bb57
..
30f8352
100644
(file)
--- a/
source/time/functions.cpp
+++ b/
source/time/functions.cpp
@@
-27,7
+27,7
@@
unsigned long long int SecondsReference;
}
}
-void anna::time::functions::initialize()
throw()
{
+void anna::time::functions::initialize() {
static bool cached = false;
if(!cached) {
SystemTimezone.set(getenv("TZ"));
static bool cached = false;
if(!cached) {
SystemTimezone.set(getenv("TZ"));
@@
-36,39
+36,39
@@
void anna::time::functions::initialize() throw() {
}
}
}
}
-void anna::time::functions::setControlPoint(unsigned long long int secondsTimestamp)
throw()
{
+void anna::time::functions::setControlPoint(unsigned long long int secondsTimestamp) {
SecondsReference = secondsTimestamp ? secondsTimestamp : (::time(NULL));
}
SecondsReference = secondsTimestamp ? secondsTimestamp : (::time(NULL));
}
-unsigned long long int anna::time::functions::getSecondsReference()
throw()
{
+unsigned long long int anna::time::functions::getSecondsReference() {
return SecondsReference;
}
return SecondsReference;
}
-const anna::time::Timezone & anna::time::functions::getSystemTimezone(void)
throw()
{
+const anna::time::Timezone & anna::time::functions::getSystemTimezone(void) {
return (SystemTimezone);
}
return (SystemTimezone);
}
-bool anna::time::functions::initialized(void)
throw()
{
+bool anna::time::functions::initialized(void) {
return (SystemTimezone.isInitialized());
}
return (SystemTimezone.isInitialized());
}
-unsigned long long int anna::time::functions::unixSeconds(void)
throw()
{
+unsigned long long int anna::time::functions::unixSeconds(void) {
return (::time(NULL));
}
return (::time(NULL));
}
-unsigned long long int anna::time::functions::unixMilliseconds()
throw()
{
+unsigned long long int anna::time::functions::unixMilliseconds() {
struct timeval tv;
gettimeofday(&tv, NULL);
return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
}
struct timeval tv;
gettimeofday(&tv, NULL);
return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
}
-unsigned long long int anna::time::functions::lapsedMilliseconds()
throw()
{
+unsigned long long int anna::time::functions::lapsedMilliseconds() {
struct timeval tv;
gettimeofday(&tv, NULL);
return ((tv.tv_sec - SecondsReference) * 1000) + (tv.tv_usec / 1000);
}
struct timeval tv;
gettimeofday(&tv, NULL);
return ((tv.tv_sec - SecondsReference) * 1000) + (tv.tv_usec / 1000);
}
-unsigned long long int anna::time::functions::unixMicroseconds(void)
throw()
{
+unsigned long long int anna::time::functions::unixMicroseconds(void) {
struct timeval tv;
gettimeofday(&tv, NULL);
unsigned long long int result(tv.tv_sec);
struct timeval tv;
gettimeofday(&tv, NULL);
unsigned long long int result(tv.tv_sec);
@@
-76,7
+76,7
@@
unsigned long long int anna::time::functions::unixMicroseconds(void) throw() {
return result += tv.tv_usec;
}
return result += tv.tv_usec;
}
-std::string anna::time::functions::currentTimeAsString(void)
throw()
{
+std::string anna::time::functions::currentTimeAsString(void) {
struct timeval tv;
gettimeofday(&tv, NULL);
struct tm *tm;
struct timeval tv;
gettimeofday(&tv, NULL);
struct tm *tm;