Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brikou/zephir-symfony-stopwatch
The Symfony's Stopwatch Component in C
https://github.com/brikou/zephir-symfony-stopwatch
Last synced: about 1 month ago
JSON representation
The Symfony's Stopwatch Component in C
- Host: GitHub
- URL: https://github.com/brikou/zephir-symfony-stopwatch
- Owner: brikou
- Created: 2013-11-19T07:35:19.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-28T15:25:23.000Z (almost 11 years ago)
- Last Synced: 2023-03-11T21:07:38.685Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 133 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Zephir Symfony Stopwatch
========================[The Symfony's Stopwatch Component](http://symfony.com/doc/current/components/stopwatch.html) delivered as a C extension with the gracefull help of [Zephir](http://zephir-lang.com/).
Install
-------```bash
sudo docker build - < dockerfile
k=`sudo docker images -q | head -n1`
sudo docker run -v=$PWD:/root -i -t $k /bin/bash
cd /root/
make compile
```Example
-------```bash
php << 'EOF'
start('eventA');
usleep(200000);
$stopwatch->start('eventB');
usleep(200000);
$eventA = $stopwatch->stop('eventA');
$eventB = $stopwatch->stop('eventB');printf("Duration of event A: %u ms.\n", $eventA->getDuration());
printf("Duration of event B: %u ms.\n", $eventB->getDuration());EOF
```Testing
-------```bash
make test
```