added jj_temporal source code

This commit is contained in:
2024-06-19 15:01:51 +02:00
parent d551f35d2f
commit 4df573d730
93 changed files with 13000 additions and 1 deletions

View File

@@ -0,0 +1,88 @@
note
description: "[
Test objects for temporal cluster.
]"
author: "Jimmy J. Johnson"
copyright: "Copyright 2009, Jimmy J. Johnson"
license: "Eiffel Forum License v2 (see forum.txt)"
URL: "$URL: $"
date: "$Date: $"
revision: "$Revision: $"
class
JJ_TEMPORAL_DEMO
create
make
feature {NONE} -- Initialization
make
-- Initialize `Current'.
local
i: INTEGER
do
create date
create time
create date_time
io.put_string (date.out)
io.new_line
io.new_line
io.put_string (time.out)
io.new_line
io.new_line
io.put_string (date_time.out)
create ymd_formatter
create timer_1
create timer_2
timer_1.reset
timer_2.reset
from i := 1
until i > 10
loop
io.put_string ("i = " + i.out + "%N")
timer_1.run
ee.sleep (100)
timer_1.stop
timer_2.run
ee.sleep (1_000_000_000)
timer_2.stop
io.put_string ("timer_1.cumulative = " + timer_1.cumulative.as_seconds.out)
io.new_line
io.put_string ("timer_2.cumulative = " + timer_2.cumulative.as_seconds.out)
io.new_line
i := i + 1
end
io.put_string ("timer_1.cumulative = " + timer_1.cumulative.as_seconds.out)
io.put_string (" %T")
io.put_string ("timer_2.cumulative = " + timer_2.cumulative.as_seconds.out)
io.new_line
-- io.put_string ("The formatted date = ")
-- io.put_string (ymd_formatter.to_string (date) + "%N")
end
feature -- Access
date: YMD_TIME
-- To test a date
time: HMS_TIME
-- To test a time
date_time: YMDHMS_TIME
-- To test a date and time
ymd_formatter: YMD_TIME_FORMATTER
-- To test the gobo parsers
timer_1, timer_2: HMS_TIMER
ee: EXECUTION_ENVIRONMENT
once
create Result
end
end

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-15-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-15-0 http://www.eiffel.com/developers/xml/configuration-1-15-0.xsd" name="jj_temporal_demo" uuid="E55510BE-486F-4ED3-A6C5-1FCCECA93777">
<target name="jj_temporal_demo">
<root class="JJ_TEMPORAL_DEMO" feature="make"/>
<option warning="true" full_class_checking="false" is_attached_by_default="true" is_obsolete_routine_type="true" void_safety="all" syntax="standard">
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="jj_temporal" location="..\jj_temporal.ecf" readonly="false">
<option is_obsolete_routine_type="true">
<assertions precondition="true"/>
</option>
</library>
<cluster name="demo" location=".\">
<file_rule>
<exclude>/.git$</exclude>
<exclude>/.svn$</exclude>
<exclude>/CVS$</exclude>
<exclude>/EIFGENs$</exclude>
</file_rule>
</cluster>
</target>
</system>