CAmvAlarm::cleared_time

This field contains the time the alarm was cleared.

Comments

If the alarm has not been cleared, this field contains a zero (0).

Syntax

CAmvAlarm* alarm_ptr;

alarm_ptr->cleared_time;

Data Type

COR_I4

Example

This example calculates the number of hours and minutes an alarm was or has been in alarm state.

COR_I4 duration;

COR_I4 minutes;

COR_I4 seconds;

long ourtime;

cor_time_get_current_local(&ourtime);

if (alarm_ptr->cleared_time == 0)

   duration = ourtime +

      alarm_ptr->amrp_sync_offset -

         alarm_ptr->generated_time;

else

   duration = alarm_ptr->cleared_time -

      alarm_ptr->generated_time;

minutes = duration / 60;

seconds = duration - ( minutes * 60 );

See Also

CAmvAlarm::generated_time

More information

CAmvAlarm Class member overview.