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
RevLine 
[41340c1]1/* CIVL implementation of time.h */
2
[bf584ca]3#ifndef __TIME_CIVL__
[41340c1]4#define __TIME_CIVL__
5
6#include<time.h>
[939152a]7#include<civlc.cvh>
[41340c1]8
9struct tm{
10 double v;
11};
12
[939152a]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) {
[3ff27cf]19 $assume(result > _time(time_count-1));
[939152a]20 } else {
[3ff27cf]21 $assume(result > 0);
[939152a]22 }
23 if(timer != NULL)
24 *timer = result;
25 return result;
26}
27
[41340c1]28#endif
Note: See TracBrowser for help on using the repository browser.