source: CIVL/include/impls/time.cvl@ 1aaefd4

main test-branch
Last change on this file since 1aaefd4 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 467 bytes
Line 
1/* CIVL implementation of time.h */
2
3#ifndef __TIME_CIVL__
4#define __TIME_CIVL__
5
6#include<time.h>
7#include<civlc.cvh>
8
9struct tm{
10 double v;
11};
12
13time_t time(time_t *timer) {
14 $abstract double _time(int count);
15 int time_count = $next_time_count();
16 double result = _time(time_count);
17
18 if (time_count > 0) {
19 $assume(result > _time(time_count-1));
20 } else {
21 $assume(result > 0);
22 }
23 if(timer != NULL)
24 *timer = result;
25 return result;
26}
27
28#endif
Note: See TracBrowser for help on using the repository browser.