anchor.diff:          true ->
               NanoSecondsDowntime
       end,
  -    nanoseconds_downtime(UpdateTimeList, NanoSecondsDowntimeNew,
  -                         NativePeriod, TimeNow).
  +    nanoseconds_downtime(UpdateTimeList, NanoSecondsDowntimeNew, T).
   
   % avoid erlang:float_to_list precision problems
   % and keep the formatting efficient
  
positive.code:     NativeDay = cloudi_timestamp:
                  convert(NanoSecondsDay, nanosecond, native),
      NanoSecondsDowntime = nanoseconds_downtime(UpdateTimeList,
                                                 NativeDay, TimeNow),
      AvailabilityDay = (erlang:min(NanoSecondsRunning, NanoSecondsDay) -
          NanoSecondsDowntime) / NanoSecondsDay,
      availability_to_string(AvailabilityDay).
  
negative.code:     NativeWeek = cloudi_timestamp:
                   convert(NanoSecondsWeek, nanosecond, native),
      NanoSecondsDowntime = nanoseconds_downtime(UpdateTimeList,
                                                 TimeNow - NativeWeek),
      AvailabilityWeek = (erlang:min(NanoSecondsRunning, NanoSecondsWeek) -
          NanoSecondsDowntime) / NanoSecondsWeek,
      availability_to_string(AvailabilityWeek).
  