#!/usr/bin/python

import sys
import os

totalTime=0

for i in range(1,11):
  fname='log%d'%i

  transfer_start_flag=0
  fr=open(fname, 'r')

  for line in fr:
    
    if line.find('TX ADVER')!=-1:
      if transfer_start_flag==0:
        transfer_start_flag=1
        for field in line.split(' '):
          transfer_startTime = field 

    if line.find('Transfer End')!=-1:
        for field in line.split(' '):
          transfer_endTime = field 

  sharingTime=float(transfer_endTime)-float(transfer_startTime)

  print sharingTime
