Mercurial > hg > orthanc-stone
diff Framework/Viewport/WebGLViewportsRegistry.h @ 1235:e71ee3e88448 broker
WebGLViewportsRegistry in milliseconds, and Clear()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Dec 2019 20:25:22 +0100 |
parents | a28861abf888 |
children | b9b5d4378874 |
line wrap: on
line diff
--- a/Framework/Viewport/WebGLViewportsRegistry.h Mon Dec 09 17:48:54 2019 +0100 +++ b/Framework/Viewport/WebGLViewportsRegistry.h Mon Dec 09 20:25:22 2019 +0100 @@ -38,8 +38,8 @@ private: typedef std::map<std::string, WebGLViewport*> Viewports; - unsigned int timeoutSeconds_; - Viewports viewports_; + double timeoutMS_; + Viewports viewports_; void LaunchTimer(); @@ -48,14 +48,19 @@ static void OnTimeoutCallback(void *userData); public: - WebGLViewportsRegistry(unsigned int timeoutSeconds); + WebGLViewportsRegistry(double timeoutMS /* in milliseconds */); - ~WebGLViewportsRegistry(); + ~WebGLViewportsRegistry() + { + Clear(); + } void Add(const std::string& canvasId); void Remove(const std::string& canvasId); + void Clear(); + class Accessor : public boost::noncopyable { private: