// Path: app/src/main/java/dynoapps/exchange_rates/App.java
// public class App extends Application {
//     private static App appInstance;
// 
//     public static App getInstance() {
//         return appInstance;
//     }
// 
//     @NonNull
//     public static Context context() {
//         return appInstance.getApplicationContext();
//     }
// 
//     public AlarmsRepository provideAlarmsRepository() {
//         return AlarmsRepository.getInstance(getApplicationContext());
//     }
// 
//     @SuppressLint("CheckResult")
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         appInstance = this;
// 
//         RxJavaPlugins.setErrorHandler(throwable -> L.e("App", throwable.getLocalizedMessage()));
//     }
// 
//     /**
//      * Enum used to identify the tracker that needs to be used for tracking.
//      * <p/>
//      * A single tracker is usually enough for most purposes. In case you do need multiple trackers,
//      * storing them all in Application object helps ensure that they are created only once per
//      * application instance.
//      */
//     public enum TrackerName {
//         APP_TRACKER, // Tracker used only in this app.
//         GLOBAL_TRACKER, // Tracker used by all the apps from a company. eg: roll-up tracking.
//     }
// 
// 
// }


import java.util.concurrent.TimeUnit;
import androidx.annotation.NonNull;
import dynoapps.exchange_rates.App;
import dynoapps.exchange_rates.R;
package dynoapps.exchange_rates.time;



/**
 * Created by erdemmac on 14/12/2016.
 */

public class TimeInterval {
    private TimeUnit timeUnit;
    private int value;

    TimeInterval(int value, TimeUnit timeUnit) {
        this.value = value;
        this.timeUnit = timeUnit;
    }

    public long to(TimeUnit unit) {
        return unit.convert(value, timeUnit);
    }

    @Override
    @NonNull
    public String toString() {
        if (timeUnit == TimeUnit.SECONDS) {
// Path: app/src/main/java/dynoapps/exchange_rates/App.java
// public class App extends Application {
//     private static App appInstance;
// 
//     public static App getInstance() {
//         return appInstance;
//     }
// 
//     @NonNull
//     public static Context context() {
//         return appInstance.getApplicationContext();
//     }
// 
//     public AlarmsRepository provideAlarmsRepository() {
//         return AlarmsRepository.getInstance(getApplicationContext());
//     }
// 
//     @SuppressLint("CheckResult")
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         appInstance = this;
// 
//         RxJavaPlugins.setErrorHandler(throwable -> L.e("App", throwable.getLocalizedMessage()));
//     }
// 
//     /**
//      * Enum used to identify the tracker that needs to be used for tracking.
//      * <p/>
//      * A single tracker is usually enough for most purposes. In case you do need multiple trackers,
//      * storing them all in Application object helps ensure that they are created only once per
//      * application instance.
//      */
//     public enum TrackerName {
//         APP_TRACKER, // Tracker used only in this app.
//         GLOBAL_TRACKER, // Tracker used by all the apps from a company. eg: roll-up tracking.
//     }
// 
// 
// }


// Path: app/src/main/java/dynoapps/exchange_rates/time/TimeInterval.java
import java.util.concurrent.TimeUnit;
import androidx.annotation.NonNull;
import dynoapps.exchange_rates.App;
import dynoapps.exchange_rates.R;

package dynoapps.exchange_rates.time;



/**
 * Created by erdemmac on 14/12/2016.
 */

public class TimeInterval {
    private TimeUnit timeUnit;
    private int value;

    TimeInterval(int value, TimeUnit timeUnit) {
        this.value = value;
        this.timeUnit = timeUnit;
    }

    public long to(TimeUnit unit) {
        return unit.convert(value, timeUnit);
    }

    @Override
    @NonNull
    public String toString() {
        if (timeUnit == TimeUnit.SECONDS) {
            return App.context().getResources().getQuantityString(R.plurals.sec_short, value, value);