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

Log Message:
-----------
Make Account::stampLastAccess() public so all can use.  Also, make 
getInactivityTime() return actual idle time.

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

Modified: rt^3/trunk/src/GS/Account.cxx
===================================================================
--- rt^3/trunk/src/GS/Account.cxx       2010-09-29 12:34:45 UTC (rev 40794)
+++ rt^3/trunk/src/GS/Account.cxx       2010-09-29 12:38:00 UTC (rev 40795)
@@ -46,7 +46,9 @@
 time_t
 Account::getInactivityTime()
 {
-       return this->lastAccess;
+       time_t now = time(NULL);
+
+       return now - this->lastAccess;
 }
 
 

Modified: rt^3/trunk/src/GS/Account.h
===================================================================
--- rt^3/trunk/src/GS/Account.h 2010-09-29 12:34:45 UTC (rev 40794)
+++ rt^3/trunk/src/GS/Account.h 2010-09-29 12:38:00 UTC (rev 40795)
@@ -38,13 +38,13 @@
   virtual ~Account();
   QString getUname();
   time_t getInactivityTime();
+  void stampLastAccess();
   
 private:
   QString uname;
   Portal* portal;
 
   time_t lastAccess;
-  void stampLastAccess();
 };
 
 #endif /* __ACCOUNT_H__ */


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