Exemplo n.º 1
0
DOMTimeMilliSec
nsDOMNavigationTiming::TimeStampToDOMOrFetchStart(mozilla::TimeStamp aStamp) const
{
  if (!aStamp.IsNull()) {
    return TimeStampToDOM(aStamp);
  } else {
    return GetFetchStart();
  }
}
Exemplo n.º 2
0
DOMTimeMilliSec
nsDOMNavigationTiming::TimeStampToDOM(mozilla::TimeStamp aStamp) const
{
  if (aStamp.IsNull()) {
    return 0;
  }
  mozilla::TimeDuration duration = aStamp - mNavigationStartTimeStamp;
  return mNavigationStart + static_cast<int32_t>(duration.ToMilliseconds());
}
Exemplo n.º 3
0
nsresult 
nsDOMNavigationTiming::TimeStampToDOMOrFetchStart(mozilla::TimeStamp aStamp, 
                                                  DOMTimeMilliSec* aResult)
{
  if (!aStamp.IsNull()) {
    return TimeStampToDOM(aStamp, aResult);
  } else {
    return GetFetchStart(aResult);
  }
}
Exemplo n.º 4
0
nsresult 
nsDOMNavigationTiming::TimeStampToDOM(mozilla::TimeStamp aStamp, 
                                      DOMTimeMilliSec* aResult)
{
  if (aStamp.IsNull()) {
    *aResult = 0;
    return NS_OK;
  }
  mozilla::TimeDuration duration = aStamp - mNavigationStartTimeStamp;
  *aResult = mNavigationStart + static_cast<PRInt32>(duration.ToMilliseconds());
  return NS_OK;
}