Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_cmbat.c
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | acpi_cmbat_info_expired(struct timespec *lastupdated) | ||||
ACPI_SERIAL_ASSERT(cmbat); | ACPI_SERIAL_ASSERT(cmbat); | ||||
if (lastupdated == NULL) | if (lastupdated == NULL) | ||||
return (TRUE); | return (TRUE); | ||||
if (!timespecisset(lastupdated)) | if (!timespecisset(lastupdated)) | ||||
return (TRUE); | return (TRUE); | ||||
getnanotime(&curtime); | getnanotime(&curtime); | ||||
timespecsub(&curtime, lastupdated); | timespecsub(&curtime, lastupdated, &curtime); | ||||
return (curtime.tv_sec < 0 || | return (curtime.tv_sec < 0 || | ||||
curtime.tv_sec > acpi_battery_get_info_expire()); | curtime.tv_sec > acpi_battery_get_info_expire()); | ||||
} | } | ||||
static void | static void | ||||
acpi_cmbat_info_updated(struct timespec *lastupdated) | acpi_cmbat_info_updated(struct timespec *lastupdated) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 267 Lines • Show Last 20 Lines |