LoTime.H

Go to the documentation of this file.
00001 /**
00002    \file  Robots/LoBot/util/LoTime.H
00003    \brief Time related functions.
00004 */
00005 
00006 // //////////////////////////////////////////////////////////////////// //
00007 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005   //
00008 // by the University of Southern California (USC) and the iLab at USC.  //
00009 // See http://iLab.usc.edu for information about this project.          //
00010 // //////////////////////////////////////////////////////////////////// //
00011 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00012 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00013 // in Visual Environments, and Applications'' by Christof Koch and      //
00014 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00015 // pending; application number 09/912,225 filed July 23, 2001; see      //
00016 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00017 // //////////////////////////////////////////////////////////////////// //
00018 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00019 //                                                                      //
00020 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00021 // redistribute it and/or modify it under the terms of the GNU General  //
00022 // Public License as published by the Free Software Foundation; either  //
00023 // version 2 of the License, or (at your option) any later version.     //
00024 //                                                                      //
00025 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00026 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00027 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00028 // PURPOSE.  See the GNU General Public License for more details.       //
00029 //                                                                      //
00030 // You should have received a copy of the GNU General Public License    //
00031 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00032 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00033 // Boston, MA 02111-1307 USA.                                           //
00034 // //////////////////////////////////////////////////////////////////// //
00035 //
00036 // Primary maintainer for this file: mviswana usc edu
00037 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Robots/LoBot/util/LoTime.H $
00038 // $Id: LoTime.H 13838 2010-08-27 20:42:20Z mviswana $
00039 //
00040 
00041 #ifndef LOBOT_TIME_UTILITIES_DOT_H
00042 #define LOBOT_TIME_UTILITIES_DOT_H
00043 
00044 //----------------------------- NAMESPACE -------------------------------
00045 
00046 namespace lobot {
00047 
00048 //---------------------- TIME RELATED FUNCTIONS -------------------------
00049 
00050 /// Return the current time in terms of the number of milliseconds since
00051 /// the Unix epoch.
00052 long long current_time() ;
00053 
00054 /// This function returns a time-stamp string of the form
00055 /// "YYYYmmdd-HHMMSS". The first time it is called, it will use the
00056 /// current time to build the above string. Subsequent calls will return
00057 /// the same string.
00058 ///
00059 /// The intent here is that different parts of Robolocust that need to
00060 /// construct file names, directory names and other such things based on
00061 /// the time when the application was started can use this single
00062 /// function to get the same suffix instead of each different part using
00063 /// a slightly different string.
00064 ///
00065 /// WARNING: This function uses internal static data and is not
00066 /// thread-safe! Hopefully, that does not pose a practical problem.
00067 /// However, if the different parts of Robolocust that use this function
00068 /// use different time-stamped suffixes in log file names, directory
00069 /// names, etc., it might be a good idea to wrap this function inside a
00070 /// singleton object and make it thread-safe.
00071 const char* startup_timestamp_str() ;
00072 
00073 //-----------------------------------------------------------------------
00074 
00075 } // end of namespace encapsulating this file's definitions
00076 
00077 #endif
00078 
00079 /* So things look consistent in everyone's emacs... */
00080 /* Local Variables: */
00081 /* indent-tabs-mode: nil */
00082 /* End: */
Generated on Sun May 8 08:41:31 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3