nsprpub/pr/src/cplus/rcinrval.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nsprpub/pr/src/cplus/rcinrval.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +/*
    1.10 +** C++ interval times (ref: prinrval.h)
    1.11 +**
    1.12 +**  An interval is a period of time. The start of the interval (epoch)
    1.13 +**  must be defined by the application. The unit of time of an interval
    1.14 +**  is platform dependent, therefore so is the maximum interval that is
    1.15 +**  representable. However, that interval is never less that ~12 hours.
    1.16 +*/
    1.17 +
    1.18 +#include "rcinrval.h"
    1.19 +
    1.20 +RCInterval::~RCInterval() { }
    1.21 +
    1.22 +RCInterval::RCInterval(RCInterval::RCReservedInterval special): RCBase()
    1.23 +{
    1.24 +    switch (special)
    1.25 +    {
    1.26 +    case RCInterval::now:
    1.27 +        interval = PR_IntervalNow();
    1.28 +        break;
    1.29 +    case RCInterval::no_timeout:
    1.30 +        interval = PR_INTERVAL_NO_TIMEOUT;
    1.31 +        break;
    1.32 +    case RCInterval::no_wait:
    1.33 +        interval = PR_INTERVAL_NO_WAIT;
    1.34 +        break;
    1.35 +    default:
    1.36 +        break;
    1.37 +    }
    1.38 +}  /* RCInterval::RCInterval */
    1.39 +
    1.40 +/* rcinrval.cpp */

mercurial