blob: 8a66eb05470c560a5b1052955feb1c48c00c8189 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010, 2012 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.core.internal.jobs;
/**
* Simple thread-safe long counter.
* @ThreadSafe
*/
public class Counter {
private long value = 0L;
public Counter() {
super();
}
public synchronized long increment() {
return value++;
}
}