mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
17 lines
364 B
C
17 lines
364 B
C
// Copyright (c) 2019 Christoffer Lerno. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
#include "benchmark.h"
|
|
#include <time.h>
|
|
|
|
static int begin = 0;
|
|
|
|
void bench_begin(void)
|
|
{
|
|
begin = clock();
|
|
}
|
|
double bench_mark(void)
|
|
{
|
|
return (double)(clock() - begin) / (double)CLOCKS_PER_SEC;
|
|
} |