annotate dwt/internal/mozilla/prinrval.d @ 156:969e7de37c3d default tip

Fixes to get dwt to work with dmd and ldc
author Jacob Carlborg <doob@me.com>
date Wed, 08 Jul 2009 21:56:44 +0200
parents 5583f8eeee6c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
125
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 module dwt.internal.mozilla.prinrval;
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 /* ***** BEGIN LICENSE BLOCK *****
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 *
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 * The contents of this file are subject to the Mozilla Public License Version
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 * 1.1 (the "License"); you may not use this file except in compliance with
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8 * the License. You may obtain a copy of the License at
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 * http://www.mozilla.org/MPL/
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 *
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 * Software distributed under the License is distributed on an "AS IS" basis,
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 * for the specific language governing rights and limitations under the
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 * License.
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15 *
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 * The Original Code is the Netscape Portable Runtime (NSPR).
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 *
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 * The Initial Developer of the Original Code is
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 * Netscape Communications Corporation.
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20 * Portions created by the Initial Developer are Copyright (C) 1998-2000
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 * the Initial Developer. All Rights Reserved.
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 *
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 * Contributor(s):
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 *
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 * Alternatively, the contents of this file may be used under the terms of
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 * in which case the provisions of the GPL or the LGPL are applicable instead
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 * of those above. If you wish to allow use of your version of this file only
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 * under the terms of either the GPL or the LGPL, and not to allow others to
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 * use your version of this file under the terms of the MPL, indicate your
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 * decision by deleting the provisions above and replace them with the notice
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 * and other provisions required by the GPL or the LGPL. If you do not delete
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 * the provisions above, a recipient may use your version of this file under
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 * the terms of any one of the MPL, the GPL or the LGPL.
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 *
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 * ***** END LICENSE BLOCK ***** */
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 import dwt.internal.mozilla.Common;
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 extern (System):
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 alias PRUint32 PRIntervalTime;
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 const PR_INTERVAL_MIN = 1000U;
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 const PR_INTERVAL_MAX = 100000U;
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 const PR_INTERVAL_NO_WAIT = 0U;
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 const PR_INTERVAL_NO_TIMEOUT = 0xffffffffU;
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 version(NON_XPCOM_GLUE)
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51 {
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 PRIntervalTime PR_IntervalNow();
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 PRUint32 PR_TicksPerSecond();
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 PRIntervalTime PR_SecondsToInterval(PRUint32 seconds);
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55 PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli);
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 PRIntervalTime PR_MicrosecondsToInterval(PRUint32 micro);
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 PRUint32 PR_IntervalToSeconds(PRIntervalTime ticks);
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 PRUint32 PR_IntervalToMilliseconds(PRIntervalTime ticks);
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59 PRUint32 PR_IntervalToMicroseconds(PRIntervalTime ticks);
5583f8eeee6c Synced mozilla with dwt-linux
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60 }