English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   AMTime, a simple GNU 'time' alternative (https://eab.abime.net/showthread.php?t=99483)

TCH 03 November 2019 00:27

AMTime, a simple GNU 'time' alternative
 
Today i tried to benchmark some project of mine with the Amiga version of the GNU
time
program (v1.7 from AmiNET), but after installed
ixemul.library
,
mathieeedoubbas.library
and
mathieeedoubtrans.library
and it still did not work, i got fed up and i wrote a simple alternative for myself, but i thought i could share it.

It does exactly the same and works exactly the same way as GNU
time
: you call it with the executable's name and it's arguments and then it executes it in a shell (with
Execute()
under KS 1.3 and with
SystemTagList()
under 2.0+) and measures the elapsed time during the call.

However, keep in mind, that this is a simple alternative, it does nothing fancy, like GNU
time
do; it does not separate the elapsed time into groups, nor it does measure CPU usage. It just measures the time spent during the shell call.

I have built the binaries with bebbo's Amiga-GCC. While SASC creates a bit (8-10 kB) smaller and faster binaries, i do not know how to switch between targeting KickStart 1.3 and 2.0+ in SASC and i was lazy to read all the manuals.
Also, the source is released as PD, so anybody can compile it with SASC if he wants. (Source portability is tested.) The
AOS1X
macro needs to be defined if somebody wants to compile it for KickStart 1.3.

Have fun and report bugs please.

Download links:

AMTime v1.0.0, KickStart 1.3/68020 version
AMTime v1.0.0, KickStart 1.3/68000 version
AMTime v1.0.0, KickStart 2.0+/68020 version
AMTime v1.0.0, KickStart 2.0+/68000 version
AMTime v1.0.0 source

TCH 17 May 2021 21:46

Version 1.0.1 is out:
- The final subtraction was done on 32-bit, thus if the difference was greater than 35 minutes, 47 seconds and 483647 microseconds, then overflow has occurred and erroneous values had been reported. Fixed and to improve readibility it reports seconds and microseconds separatedly.
- Some minor internal changes.

Download links:

AMTime v1.0.1, AmigaOS 1.3/68020 version
AMTime v1.0.1, AmigaOS 1.3/68000 version
AMTime v1.0.1, AmigaOS 2.0+/68020 version
AMTime v1.0.1, AmigaOS 2.0+/68000 version
AMTime v1.0.1 source


All times are GMT +2. The time now is 23:19.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.08121 seconds with 11 queries