1 package com.atlassian.pageobjects.elements.query.util;
2
3 /**
4 * Utilities for clocks.
5 *
6 */
7 public final class Clocks
8 {
9 private Clocks()
10 {
11 throw new AssertionError("Don't instantiate me");
12 }
13
14 public static Clock getClock(Object instance)
15 {
16 if (instance instanceof ClockAware)
17 {
18 return ((ClockAware) instance).clock();
19 }
20 else
21 {
22 return SystemClock.INSTANCE;
23 }
24 }
25 }