MCPcopy Create free account
hub / github.com/facebook/time / ClearDevice

Method ClearDevice

calnex/api/api.go:978–987  ·  view source on GitHub ↗

ClearDevice clears device data

()

Source from the content-addressed store, hash-verified

976}
977
978// ClearDevice clears device data
979func (a *API) ClearDevice() error {
980 // check measurement status
981 status, err := a.FetchStatus()
982
983 if err == nil && status.MeasurementActive {
984 // stop measurement if possible
985 _ = a.StopMeasure()
986 }
987 return a.get(clearDeviceURL)
988}
989
990// Reboot the device

Callers 2

clearDeviceFunction · 0.95
TestGetFunction · 0.95

Calls 3

FetchStatusMethod · 0.95
StopMeasureMethod · 0.95
getMethod · 0.95

Tested by 1

TestGetFunction · 0.76