You could start a timer before training for one epoch and calculate the elapsed time afterwards.
def train(epoch):
    for batch_idx, (data, target) in enumerate(train_loader):
    # your training code ...


t0 = time.time()
train(1)
print('{} seconds'.format(time.time() - t0)