snapcast/client/timeProvider.h
(no author) feabfee936 xxxx
git-svn-id: svn://elaine/murooma/trunk@272 d8a302eb-03bc-478d-80e4-98257eca68ef
2014-09-17 21:58:38 +00:00

34 lines
732 B
C++

#ifndef TIME_PROVIDER_H
#define TIME_PROVIDER_H
#include "doubleBuffer.h"
class TimeProvider
{
public:
static TimeProvider& getInstance()
{
static TimeProvider instance;
return instance;
}
void setDiffToServer(double ms);
long getDiffToServer();
long getDiffToServerMs();
private:
TimeProvider(); // Constructor? (the {} brackets) are needed here.
// Dont forget to declare these two. You want to make sure they
// are unaccessable otherwise you may accidently get copies of
// your singleton appearing.
TimeProvider(TimeProvider const&); // Don't Implement
void operator=(TimeProvider const&); // Don't implement
DoubleBuffer<long> diffBuffer;
long diffToServer;
};
#endif