AminetAminet
Search:
84450 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/c/ms.lha

Mirror:Random
Showing:i386-arosgeneric
No screenshot available
Short:C str to us / ms utilities
Author:TJ Holowaychuk
Uploader:Carsten Larsen (carsten larsen mail com)
Type:dev/c
Version:0.0.4
Architecture:generic; m68k-amigaos
URL:https://github.com/clibs/ms.git
Date:2020-05-08
Download:http://aminet.net/dev/c/ms.lha - View contents
Readme:http://aminet.net/dev/c/ms.readme
Downloads:706

About

    Convert strings like "15s" to seconds, milliseconds, or microseconds,
    and convert milliseconds to strings ("300ms", "5ms") or long strings
    ("5 seconds", "1 month").

Installation

    Copy ms.h and ms.c to your source code tree.

Usage

    View the tests in test.c.

API

    long long
    string_to_microseconds(const char *str);

    long long
    string_to_milliseconds(const char *str);

    long long
    string_to_seconds(const char *str);

    char *
    milliseconds_to_string(long long ms);

    char *
    milliseconds_to_long_string(long long ms);


Contents of dev/c/ms.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                  238     435  54.7% -lh5- fb9d May  7 12:30 ms/History.md
[unknown]                  221     319  69.3% -lh5- 5fbb May  7 12:30 ms/Makefile
[unknown]                 1278    5372  23.8% -lh5- 147a May  7 12:30 ms/ms.c
[unknown]                  182     385  47.3% -lh5- 029f May  7 12:30 ms/ms.h
[unknown]                  386     827  46.7% -lh5- 15a8 May  7 12:30 ms/ms.readme
[unknown]                  277     623  44.5% -lh5- 491a May  7 12:30 ms/Readme.md
[unknown]                 2360    5074  46.5% -lh5- 1df9 May  7 12:30 ms/strtoll.c
[unknown]                22199   42136  52.7% -lh5- a117 May  7 12:30 ms/test
[unknown]                  834    3869  21.6% -lh5- 5960 May  7 12:30 ms/test.c
[unknown]                 2653    8515  31.2% -lh5- 3d40 May  7 12:30 ms/vstring.h
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        10 files   30628   67555  45.3%            May  8 20:32

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>