Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Commit b196bdc

Browse files
committed
update readme
1 parent 14622c1 commit b196bdc

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,23 @@ public class DebugApplication extends Application {
2626
.show(this);
2727

2828
//alternatively
29-
new TinyDancerBuilder()
29+
TinyDancer.create()
3030
.redFlagPercentage(.1f) // set red indicator for 10%
3131
.startingGravity(Gravity.TOP)
3232
.startingXPosition(200)
3333
.startingYPosition(600)
3434
.show(this);
35+
36+
//you can add a callback to get frame times and the calculated
37+
//number of dropped frames within that window
38+
TinyDancer.create()
39+
.addFrameDataCallback(new FrameDataCallback() {
40+
@Override
41+
public void doFrame(long previousFrameNS, long currentFrameNS, int droppedFrames) {
42+
//collect your stats here
43+
}
44+
})
45+
.show(this);
3546
}
3647
}
3748
```
@@ -40,8 +51,6 @@ public class DebugApplication extends Application {
4051

4152

4253

43-
44-
4554
See sample application that simulates excessive bind time
4655

4756
![Tiny Dancer Sample](https://raw.githubusercontent.com/brianPlummer/TinyDancer/master/assets/tinydancer1.gif "Tiny Dancer Sample")

0 commit comments

Comments
 (0)