cyphesis/tests/stubs/modules/stubWorldTime.h
2015-05-24 11:25:08 +02:00

48 lines
1.5 KiB
C++

// Cyphesis Online RPG Server and AI Engine
// Copyright (C) 2000,2001 Alistair Riddoch
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "modules/WorldTime.h"
static inline double minutes(const double & n) { return 60.0*n; }
static inline double hours(const double & n) { return minutes(60)*n; }
static inline double days(const double & n) { return hours(24)*n; }
static inline double months(const double & n) { return days(30)*n; }
static inline double years(const double & n) { return months(12)*n; }
inline const std::string seconds2string(double seconds) {
return "";
}
void WorldTime::initTimeInfo()
{
}
std::string WorldTime::operator[](const std::string & name)
{
return "";
}
bool WorldTime::operator==(const WorldTime & other) const
{
return true;
}
bool WorldTime::operator==(const std::string & when) const
{
return false;
}