1 /* bzflag 2 * Copyright (c) 1993-2021 Tim Riker 3 * 4 * This package is free software; you can redistribute it and/or 5 * modify it under the terms of the license found in the file 6 * named COPYING that should have accompanied this file. 7 * 8 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 9 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 10 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11 */ 12 13 /** 14 * GameTime: 15 * Manages the network time. 16 * Time is stored as microseconds since the epoch. 17 */ 18 19 #ifndef BZF_GAME_TIME_H 20 #define BZF_GAME_TIME_H 21 22 #include "common.h" 23 24 25 namespace GameTime 26 { 27 void reset(); 28 void update(); 29 30 void setStepTime(); 31 double getStepTime(); 32 33 int packSize(); 34 void* pack(void *, float lag); 35 const void* unpack(const void *); 36 37 const float startRate = 1.0f; 38 const float finalRate = 10.0f; 39 } 40 41 42 #endif // BZF_GAME_TIME_H 43 44 // Local Variables: *** 45 // mode: C++ *** 46 // tab-width: 4 *** 47 // c-basic-offset: 4 *** 48 // indent-tabs-mode: nil *** 49 // End: *** 50 // ex: shiftwidth=4 tabstop=4 51