Revision: 40796
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40796&view=rev
Author:   davidloman
Date:     2010-09-29 12:38:37 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
Copy/Paste time stamping on Account to Session

Modified Paths:
--------------
    rt^3/trunk/src/GS/Session.cxx
    rt^3/trunk/src/GS/Session.h

Modified: rt^3/trunk/src/GS/Session.cxx
===================================================================
--- rt^3/trunk/src/GS/Session.cxx       2010-09-29 12:38:00 UTC (rev 40795)
+++ rt^3/trunk/src/GS/Session.cxx       2010-09-29 12:38:37 UTC (rev 40796)
@@ -46,6 +46,20 @@
     return this->a;
 }
 
+
+void
+Session::stampLastAccess()
+{
+       this->lastAccess = time (NULL);
+}
+
+time_t
+Session::getInactivityTime()
+{
+       time_t now = time(NULL);
+
+       return now - this->lastAccess;
+}
 // Local Variables: ***
 // mode: C++ ***
 // tab-width: 8 ***

Modified: rt^3/trunk/src/GS/Session.h
===================================================================
--- rt^3/trunk/src/GS/Session.h 2010-09-29 12:38:00 UTC (rev 40795)
+++ rt^3/trunk/src/GS/Session.h 2010-09-29 12:38:37 UTC (rev 40796)
@@ -31,6 +31,7 @@
 #include <iostream>
 #include <ios>
 #include <fstream>
+#include <ctime>
 
 #include <QtCore/QUuid>
 
@@ -41,13 +42,17 @@
     virtual ~Session();
 
     QUuid getSessionID();
-    Account*  getAccount();
+    Account* getAccount();
 
+    time_t getInactivityTime();
+    void stampLastAccess();
+
 private:
     Session(Account* a);
 
     QUuid sessionID;
     Account* a;
+    time_t lastAccess;
 };
 
 #endif


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to