ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

tvarith.h
Go to the documentation of this file.
00001 /*
00002  * tvarith.h
00003  * - static inline functions for doing arithmetic on timevals
00004  */
00005 /*
00006  *  This file is
00007  *    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
00008  *
00009  *  It is part of adns, which is
00010  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
00011  *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
00012  *
00013  *  This program is free software; you can redistribute it and/or modify
00014  *  it under the terms of the GNU General Public License as published by
00015  *  the Free Software Foundation; either version 2, or (at your option)
00016  *  any later version.
00017  *
00018  *  This program is distributed in the hope that it will be useful,
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *  GNU General Public License for more details.
00022  *
00023  *  You should have received a copy of the GNU General Public License
00024  *  along with this program; if not, write to the Free Software Foundation,
00025  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00026  */
00027 
00028 #ifndef ADNS_TVARITH_H_INCLUDED
00029 #define ADNS_TVARITH_H_INCLUDED
00030 
00031 static inline void timevaladd(struct timeval *tv_io, long ms) {
00032   struct timeval tmp;
00033   assert(ms>=0);
00034   tmp= *tv_io;
00035   tmp.tv_usec += (ms%1000)*1000;
00036   tmp.tv_sec += ms/1000;
00037   if (tmp.tv_usec >= 1000000) { tmp.tv_sec++; tmp.tv_usec -= 1000000; }
00038   *tv_io= tmp;
00039 }
00040 
00041 #endif

Generated on Sun May 27 2012 04:33:26 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.