blob: f96568bacce67119781e5e420b0df2093141441d [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.store.host.impl;
Madan Jampanifd26ffb2014-10-13 14:08:55 -070017
18import static org.slf4j.LoggerFactory.getLogger;
19
20import org.apache.felix.scr.annotations.Activate;
21import org.apache.felix.scr.annotations.Component;
22import org.apache.felix.scr.annotations.Deactivate;
23import org.apache.felix.scr.annotations.Service;
Brian O'Connorabafb502014-12-02 22:26:20 -080024import org.onosproject.net.HostId;
25import org.onosproject.net.host.HostClockService;
26import org.onosproject.store.Timestamp;
Jonathan Hart63939a32015-05-08 11:57:03 -070027import org.onosproject.store.service.WallClockTimestamp;
Madan Jampanifd26ffb2014-10-13 14:08:55 -070028import org.slf4j.Logger;
29
30/**
31 * HostClockService to issue Timestamps based on local wallclock time.
32 */
33@Component(immediate = true)
34@Service
35public class HostClockManager implements HostClockService {
36
37 private final Logger log = getLogger(getClass());
38
39 @Activate
40 public void activate() {
41 log.info("Started");
42 }
43
44 @Deactivate
45 public void deactivate() {
46 log.info("Stopped");
47 }
48
49 @Override
Madan Jampanib5e9b1d2014-10-13 14:18:39 -070050 public Timestamp getTimestamp(HostId hostId) {
Madan Jampanifd26ffb2014-10-13 14:08:55 -070051 return new WallClockTimestamp();
52 }
53}