PageRenderTime 15ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/time/clock.e

http://github.com/tybor/Liberty
Specman e | 60 lines | 30 code | 5 blank | 25 comment | 0 complexity | 1d45150223dc271c52102a67b7e1bbe4 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4expanded class CLOCK
 5
 6feature {ANY}
 7   value: INTEGER
 8         -- Get the CPU clock periods if available (-1 if not).
 9      do
10         Result := basic_clock
11      end
12
13   periods_per_second: INTEGER
14         -- The number of clock periods per seconds.
15      require
16         value >= 0
17      do
18         Result := basic_clock_per_sec
19      end
20
21feature {}
22   basic_clock: INTEGER
23      external "plug_in"
24      alias "{
25         location: "${sys}/plugins"
26         module_name: "time/clock"
27         feature_name: "basic_clock"
28         }"
29      end
30
31   basic_clock_per_sec: INTEGER
32      external "plug_in"
33      alias "{
34         location: "${sys}/plugins"
35         module_name: "time/clock"
36         feature_name: "basic_clock_per_sec"
37         }"
38      end
39
40end -- class CLOCK
41--
42-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
43--
44-- Permission is hereby granted, free of charge, to any person obtaining a copy
45-- of this software and associated documentation files (the "Software"), to deal
46-- in the Software without restriction, including without limitation the rights
47-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48-- copies of the Software, and to permit persons to whom the Software is
49-- furnished to do so, subject to the following conditions:
50--
51-- The above copyright notice and this permission notice shall be included in
52-- all copies or substantial portions of the Software.
53--
54-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60-- THE SOFTWARE.