Make failure of HAL_GetFPGATime() more descriptive (#1633)

This commit is contained in:
Tyler Veness
2019-04-27 20:34:14 -07:00
committed by Peter Johnson
parent 2de3bf7f58
commit d3affb16bc
2 changed files with 6 additions and 4 deletions

View File

@@ -21,8 +21,9 @@ fpga_clock::time_point fpga_clock::now() noexcept {
uint64_t currentTime = HAL_GetFPGATime(&status);
if (status != 0) {
wpi::errs()
<< "Call to HAL_GetFPGATime failed."
<< "Initialization might have failed. Time will not be correct\n";
<< "Call to HAL_GetFPGATime failed in fpga_clock::now() with status "
<< status
<< ". Initialization might have failed. Time will not be correct\n";
wpi::errs().flush();
return epoch();
}