Question: How do I start my function every 5 minutes and 20 seconds? I used: 

```
self.timer = QtCore.QTimer(self)
self.timer.timeout.connect(self.updateplot)
self.timer.start(310000)

```

But I'd like to set it by the time of my PC - so if I start the program at 3:23, the update track is at 3:25:20, 3:30:20 etc.

Answer: 
Using reflection you can give a try to `get` the value of the fields of object:

```
Dog dog = new Dog("labrador","tarzan","uk"); // sample
List<String> values = Arrays.stream(Dog.class.getDeclaredFields())
        .filter(f ->f.getType().equals(String.class))
        .map(f -> {
  try {
    return (String) f.get(dog); // get the value of field from the object
  } catch (IllegalAccessException e) { 
    return ""; /// handle in a cleaner way
  }
}).collect(Collectors.toList());

```
You can you json serialization.
Consider below code:

```
List<String> StringFieldList = Arrays.asList("breed", "name", "origin");
Gson gson = new Gson();
Dog dogObject = new Dog();
//set all field(s) value
JsonObject dogJsonObject  = (JsonObject) gson.toJsonTree(dogObject, Dog.class);

for (String field : StringFieldList) {
    String stringFieldValue = dogJsonObject.get(field).getAsString();
    //Add stringFieldValue in list            
}

```