SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
Chrono.java
1/*
2 * Class: Chrono
3 * Description: computes the CPU time for the current thread only
4 * Environment: Java
5 * Software: SSJ
6 * Copyright (C) 2001 Pierre L'Ecuyer and Universite de Montreal
7 * Organization: DIRO, Universite de Montreal
8 * @author Éric Buist
9 * @since
10 *
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *
24 */
25package umontreal.ssj.util;
26
37public class Chrono extends AbstractChrono {
38 private ChronoSingleThread chrono = new ChronoSingleThread();
39
40 protected void getTime(long[] tab) {
41 chrono.getTime(tab);
42 }
43
47 public Chrono() {
48 chrono.init();
49 init();
50 }
51
60 public static Chrono createForSingleThread() {
61 return new Chrono();
62 }
63
64}
void init()
Initializes this AbstractChrono to zero.
Extends the AbstractChrono class to compute the CPU time for a single thread.
static Chrono createForSingleThread()
Creates a Chrono instance adapted for a program using a single thread.
Definition Chrono.java:60
Chrono()
Constructs a Chrono object and initializes it to zero.
Definition Chrono.java:47