code: public void assignTimestamp(XEvent event, long time) {
  		XAttributeTimestamp attr = (XAttributeTimestamp) ATTR_TIMESTAMP.clone();
  		attr.setValueMillis(time);
  		event.getAttributes().put(KEY_TIMESTAMP, attr);
  	}
docs: Assigns to a given event its timestamp.
  
  @param event
  Event to be modified.
  @param time
  Timestamp, as a long of milliseconds in UNIX time.