[colobot] 358/390: Remove unused system utils functions
Didier Raboud
odyx at moszumanska.debian.org
Fri Jun 12 14:22:05 UTC 2015
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch upstream/latest
in repository colobot.
commit 0ddfdebab311d264234981007cda2ab254f51bf9
Author: Piotr Dziwinski <piotrdz at gmail.com>
Date: Wed May 13 20:52:19 2015 +0200
Remove unused system utils functions
---
src/app/system.cpp | 16 ----------------
src/app/system.h | 6 ------
src/app/system_linux.cpp | 5 -----
src/app/system_linux.h | 1 -
src/app/system_other.cpp | 5 -----
src/app/system_other.h | 1 -
src/app/system_windows.cpp | 5 -----
src/app/system_windows.h | 1 -
8 files changed, 40 deletions(-)
diff --git a/src/app/system.cpp b/src/app/system.cpp
index 6b18f63..6546131 100644
--- a/src/app/system.cpp
+++ b/src/app/system.cpp
@@ -157,22 +157,6 @@ void CSystemUtils::CopyTimeStamp(SystemTimeStamp *dst, SystemTimeStamp *src)
*dst = *src;
}
-float CSystemUtils::GetTimeStampResolution(SystemTimeUnit unit)
-{
- unsigned long long exact = GetTimeStampExactResolution();
- float result = 0.0f;
- if (unit == STU_SEC)
- result = exact * 1e-9;
- else if (unit == STU_MSEC)
- result = exact * 1e-6;
- else if (unit == STU_USEC)
- result = exact * 1e-3;
- else
- assert(false);
-
- return result;
-}
-
float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *after, SystemTimeUnit unit)
{
long long exact = TimeStampExactDiff(before, after);
diff --git a/src/app/system.h b/src/app/system.h
index ab25801..74702de 100644
--- a/src/app/system.h
+++ b/src/app/system.h
@@ -115,12 +115,6 @@ public:
//! Returns a time stamp associated with current time
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) = 0;
- //! Returns the platform's expected time stamp resolution
- TEST_VIRTUAL float GetTimeStampResolution(SystemTimeUnit unit = STU_SEC);
-
- //! Returns the platform's exact (in nanosecond units) expected time stamp resolution
- virtual long long GetTimeStampExactResolution() = 0;
-
//! Returns a difference between two timestamps in given time unit
/** The difference is \a after - \a before. */
TEST_VIRTUAL float TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *after, SystemTimeUnit unit = STU_SEC);
diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp
index 1a1b76d..2427b09 100644
--- a/src/app/system_linux.cpp
+++ b/src/app/system_linux.cpp
@@ -87,11 +87,6 @@ void CSystemUtilsLinux::GetCurrentTimeStamp(SystemTimeStamp *stamp)
clock_gettime(CLOCK_MONOTONIC_RAW, &stamp->clockTime);
}
-long long CSystemUtilsLinux::GetTimeStampExactResolution()
-{
- return 1ll;
-}
-
long long CSystemUtilsLinux::TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after)
{
return (after->clockTime.tv_nsec - before->clockTime.tv_nsec) +
diff --git a/src/app/system_linux.h b/src/app/system_linux.h
index b60954e..64501c4 100644
--- a/src/app/system_linux.h
+++ b/src/app/system_linux.h
@@ -45,7 +45,6 @@ public:
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE;
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE;
- virtual long long GetTimeStampExactResolution() OVERRIDE;
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE;
virtual std::string GetSaveDir() OVERRIDE;
diff --git a/src/app/system_other.cpp b/src/app/system_other.cpp
index bedeb23..c156cb3 100644
--- a/src/app/system_other.cpp
+++ b/src/app/system_other.cpp
@@ -30,11 +30,6 @@ void CSystemUtilsOther::GetCurrentTimeStamp(SystemTimeStamp* stamp)
stamp->sdlTicks = SDL_GetTicks();
}
-long long int CSystemUtilsOther::GetTimeStampExactResolution()
-{
- return 1000000ll;
-}
-
long long int CSystemUtilsOther::TimeStampExactDiff(SystemTimeStamp* before, SystemTimeStamp* after)
{
return (after->sdlTicks - before->sdlTicks) * 1000000ll;
diff --git a/src/app/system_other.h b/src/app/system_other.h
index 862f63e..586a53d 100644
--- a/src/app/system_other.h
+++ b/src/app/system_other.h
@@ -46,7 +46,6 @@ public:
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE;
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE;
- virtual long long int GetTimeStampExactResolution() OVERRIDE;
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE;
virtual void Usleep(int usec) OVERRIDE;
diff --git a/src/app/system_windows.cpp b/src/app/system_windows.cpp
index e16b65a..7acb790 100644
--- a/src/app/system_windows.cpp
+++ b/src/app/system_windows.cpp
@@ -83,11 +83,6 @@ void CSystemUtilsWindows::GetCurrentTimeStamp(SystemTimeStamp* stamp)
stamp->counterValue = value.QuadPart;
}
-long long int CSystemUtilsWindows::GetTimeStampExactResolution()
-{
- return 1000000000ll / m_counterFrequency;
-}
-
long long int CSystemUtilsWindows::TimeStampExactDiff(SystemTimeStamp* before, SystemTimeStamp* after)
{
float floatValue = static_cast<double>(after->counterValue - before->counterValue) * (1e9 / static_cast<double>(m_counterFrequency));
diff --git a/src/app/system_windows.h b/src/app/system_windows.h
index e5141cb..ca35ab3 100644
--- a/src/app/system_windows.h
+++ b/src/app/system_windows.h
@@ -43,7 +43,6 @@ public:
virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE;
virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE;
- virtual long long GetTimeStampExactResolution() OVERRIDE;
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE;
virtual std::string GetSaveDir() OVERRIDE;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list