Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /*
7 ** Class implementation for calendar time routines (ref: prtime.h)
8 */
10 #include "rctime.h"
12 RCTime::~RCTime() { }
14 RCTime::RCTime(PRTime time): RCBase() { gmt = time; }
15 RCTime::RCTime(const RCTime& his): RCBase() { gmt = his.gmt; }
16 RCTime::RCTime(RCTime::Current): RCBase() { gmt = PR_Now(); }
17 RCTime::RCTime(const PRExplodedTime& time): RCBase()
18 { gmt = PR_ImplodeTime(&time); }
20 void RCTime::operator=(const PRExplodedTime& time)
21 { gmt = PR_ImplodeTime(&time); }
23 RCTime RCTime::operator+(const RCTime& his)
24 { RCTime sum(gmt + his.gmt); return sum; }
26 RCTime RCTime::operator-(const RCTime& his)
27 { RCTime difference(gmt - his.gmt); return difference; }
29 RCTime RCTime::operator/(PRUint64 his)
30 { RCTime quotient(gmt / gmt); return quotient; }
32 RCTime RCTime::operator*(PRUint64 his)
33 { RCTime product(gmt * his); return product; }