fixed next timer variable types
This commit is contained in:
parent
2617274989
commit
a5092220b4
1 changed files with 7 additions and 4 deletions
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: contiki-cooja-main.c,v 1.3 2010/03/23 13:12:41 fros4943 Exp $
|
* $Id: contiki-cooja-main.c,v 1.4 2010/03/25 09:12:03 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -353,6 +353,9 @@ Java_se_sics_cooja_corecomm_CLASSNAME_setMemory(JNIEnv *env, jobject obj, jint r
|
||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
Java_se_sics_cooja_corecomm_CLASSNAME_tick(JNIEnv *env, jobject obj)
|
Java_se_sics_cooja_corecomm_CLASSNAME_tick(JNIEnv *env, jobject obj)
|
||||||
{
|
{
|
||||||
|
clock_time_t nextEtimer;
|
||||||
|
rtimer_clock_t nextRtimer;
|
||||||
|
|
||||||
simProcessRunValue = 0;
|
simProcessRunValue = 0;
|
||||||
|
|
||||||
/* Let all simulation interfaces act first */
|
/* Let all simulation interfaces act first */
|
||||||
|
@ -382,9 +385,9 @@ Java_se_sics_cooja_corecomm_CLASSNAME_tick(JNIEnv *env, jobject obj)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save nearest event timer expiration time */
|
/* Save nearest expiration time */
|
||||||
int nextEtimer = etimer_next_expiration_time() - simCurrentTime;
|
nextEtimer = etimer_next_expiration_time() - (clock_time_t) simCurrentTime;
|
||||||
int nextRtimer = rtimer_arch_next() - simCurrentTime;
|
nextRtimer = rtimer_arch_next() - (rtimer_clock_t) simCurrentTime;
|
||||||
if(etimer_pending() && rtimer_arch_pending()) {
|
if(etimer_pending() && rtimer_arch_pending()) {
|
||||||
simNextExpirationTime = MIN(nextEtimer, nextRtimer);
|
simNextExpirationTime = MIN(nextEtimer, nextRtimer);
|
||||||
} else if (etimer_pending()) {
|
} else if (etimer_pending()) {
|
||||||
|
|
Loading…
Reference in a new issue