karouani / javasimon

Automatically exported from code.google.com/p/javasimon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Callback example has wrong methods #107

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi there,

the methode signatures in the example are wrong. The @Override annotation would 
have prevented this. They must be like this:

 SimonManager.callback().addCallback(new CallbackSkeleton() {
                @Override
                public void onStopwatchStart(Split split) {
                        System.out.println("Stopwatch " + split.getStopwatch().getName()
                                + " has just been started.");
                }
                @Override
                public void onStopwatchStop(Split split, StopwatchSample sample) {
                        System.out.println("Stopwatch " + split.getStopwatch().getName()
                                + " has just been stopped (" + SimonUtils.presentNanoTime(split.runningFor()) + ").");
                }
        });

Original issue reported on code.google.com by oliver.h...@gmail.com on 6 Jun 2013 at 12:45

GoogleCodeExporter commented 8 years ago
Thanks for the report. First I couldn't find the problem, as everything is OK 
in the code examples - then it got me - wiki page is out of date. I fixed most 
of the page, it needed much more to be really up to date - hopefully it is now.

Original comment by virgo47 on 6 Jun 2013 at 1:27

GoogleCodeExporter commented 8 years ago

Original comment by virgo47 on 14 Aug 2013 at 6:02