Loading [MathJax]/extensions/tex2jax.js
ROOT
6.10/09
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
v
w
x
y
z
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
core
base
src
TTime.cxx
Go to the documentation of this file.
1
// @(#)root/base:$Id$
2
// Author: Fons Rademakers 28/11/96
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
/** \class TTime
13
\ingroup Base
14
15
Basic time type with millisecond precision.
16
*/
17
18
#include "
TTime.h
"
19
#include "
TString.h
"
20
#include "
TError.h
"
21
22
23
ClassImp
(
TTime
)
24
25
////////////////////////////////////////////////////////////////////////////////
26
/// Return the time as a string.
27
28
const
char
*
TTime
::AsString()
const
29
{
30
return
Form
(
"%lld"
, fMilliSec);
31
}
32
33
////////////////////////////////////////////////////////////////////////////////
34
35
TTime::operator long()
const
36
{
37
#ifndef R__B64
38
if
(fMilliSec > (
Long64_t
)
kMaxInt
)
39
Error
(
"TTime::operator long()"
,
"time truncated, use operator long long"
);
40
#endif
41
return
(
Long_t
) fMilliSec;
42
}
43
44
////////////////////////////////////////////////////////////////////////////////
45
46
TTime::operator
unsigned
long()
const
47
{
48
#ifndef R__B64
49
if
(fMilliSec > (
Long64_t
)
kMaxUInt
)
50
Error
(
"TTime::operator unsigned long()"
,
"time truncated, use operator unsigned long long"
);
51
#endif
52
return
(
ULong_t
) fMilliSec;
53
}
kMaxUInt
const UInt_t kMaxUInt
Definition:
RtypesCore.h:102
TTime.h
Long64_t
long long Long64_t
Definition:
RtypesCore.h:69
TTime
Basic time type with millisecond precision.
Definition:
TTime.h:27
Error
void Error(const char *location, const char *msgfmt,...)
TString.h
TError.h
Form
char * Form(const char *fmt,...)
Long_t
long Long_t
Definition:
RtypesCore.h:50
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:336
ULong_t
unsigned long ULong_t
Definition:
RtypesCore.h:51
kMaxInt
const Int_t kMaxInt
Definition:
RtypesCore.h:103