using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DekoratorProfilujący
{
    public class AdapterStoper : IStoper
    {
        public AdapterStoper(Stopwatch stoper)
        {
            this.stoper = stoper;
        }

        public void Start()
        {
            stoper.Start();
        }

        public long Stop()
        {
            stoper.Stop();
            var milisekundy = stoper.ElapsedMilliseconds;
            stoper.Reset();
            return milisekundy;
        }

        private readonly Stopwatch stoper;
    }
}
