Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

CArchTimeUnix.cpp

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #include "CArchTimeUnix.h"
00016 #if TIME_WITH_SYS_TIME
00017 #   include <sys/time.h>
00018 #   include <time.h>
00019 #else
00020 #   if HAVE_SYS_TIME_H
00021 #       include <sys/time.h>
00022 #   else
00023 #       include <time.h>
00024 #   endif
00025 #endif
00026 
00027 //
00028 // CArchTimeUnix
00029 //
00030 
00031 CArchTimeUnix::CArchTimeUnix()
00032 {
00033     // do nothing
00034 }
00035 
00036 CArchTimeUnix::~CArchTimeUnix()
00037 {
00038     // do nothing
00039 }
00040 
00041 double
00042 CArchTimeUnix::time()
00043 {
00044     struct timeval t;
00045     gettimeofday(&t, NULL);
00046     return (double)t.tv_sec + 1.0e-6 * (double)t.tv_usec;
00047 }

Generated on Fri Nov 6 00:21:13 2009 for synergy-plus by  doxygen 1.3.9.1