Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_smbat.c
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | acpi_smbat_info_expired(struct timespec *lastupdated) | ||||
ACPI_SERIAL_ASSERT(smbat); | ACPI_SERIAL_ASSERT(smbat); | ||||
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_smbat_info_updated(struct timespec *lastupdated) | acpi_smbat_info_updated(struct timespec *lastupdated) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines |