search for: time_left

Displaying 20 results from an estimated 33 matches for "time_left".

2006 May 02
2
flash not shown
...ng the following code (inspired by one of the books) to check if the user''s session should have timed out. # Check to see if the user has been inactive for longer than the # expiry period. If they have, reset the session. def check_timeout if session[:expires_at] != nil @time_left = (session[:expires_at] - Time.now).to_i unless @time_left > 0 reset_session # TODO - This flash is never shown, because we redirect maybe? flash[:error] = ''Your session has timed out, please login to continue.'' redirect_to :controller =&g...
2007 Jun 13
0
Branch 'as' - 2 commits - libswfdec/swfdec_sprite.c test/trace
...8 2007 +0200 simplify code diff --git a/test/trace/trace.c b/test/trace/trace.c index 990e7cb..55f8e98 100644 --- a/test/trace/trace.c +++ b/test/trace/trace.c @@ -17,7 +17,7 @@ run_test (const char *filename) SwfdecLoader *loader; SwfdecPlayer *player; SwfdecBuffer *buffer; - guint time_left; + guint advance; char *str; GString *string; GError *error = NULL; @@ -38,17 +38,8 @@ run_test (const char *filename) return FALSE; } - time_left = ceil (10000 / swfdec_player_get_rate (player)); - /* FIXME: Make the number of iterations configurable? */ - while (TRUE) { -...
2007 Aug 26
0
9 commits - libswfdec-gtk/swfdec_source.c libswfdec/swfdec_marshal.list libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_instance.c test/dump.c test/Makefile.am
...trace.c +++ b/test/trace/trace.c @@ -133,7 +133,6 @@ run_test (gpointer testp, gpointer unuse /* FIXME: will not do 10 iterations if there's other stuff loaded */ glong advance = swfdec_player_get_next_event (player); - g_print ("advancing %ld (of %lu left)\n", advance, time_left); g_assert (advance >= 0); if (inter) { int t = swfdec_interaction_get_next_event (inter); diff-tree d1ca3601102b10b5d64f03eed69d1634b193d7dd (from 01235ec735043322af3c5be841275b87858d6831) Author: Benjamin Otte <otte at gnome.org> Date: Sun Aug 26 19:18:50 2007 +0200...
2020 Sep 14
2
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...196674 Jie Deng 2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); > 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; > 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; > 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; > 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; > 0a54ec77196674 Jie Deng 2020-09-11 116 > 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); > 0a54ec77196674 Jie Deng 2020-09-11 118 vmsg = &vi->vmsg; > 0a54ec77196674 Jie Deng 2...
2020 Sep 14
2
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...196674 Jie Deng 2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); > 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; > 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; > 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; > 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; > 0a54ec77196674 Jie Deng 2020-09-11 116 > 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); > 0a54ec77196674 Jie Deng 2020-09-11 118 vmsg = &vi->vmsg; > 0a54ec77196674 Jie Deng 2...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...+static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg >> *msgs, int num) >> +{ >> +??? struct virtio_i2c *vi = i2c_get_adapdata(adap); >> +??? struct virtio_i2c_msg *vmsg_o, *vmsg_i; >> +??? struct virtqueue *vq = vi->vq; >> +??? unsigned long time_left; >> +??? int len, i, ret = 0; >> + >> +??? vmsg_o = kzalloc(sizeof(*vmsg_o), GFP_KERNEL); >> +??? if (!vmsg_o) >> +??????? return -ENOMEM; > > > It looks to me we can avoid the allocation by embedding virtio_i2c_msg > into struct virtio_i2c; > Yeah... T...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...+static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg >> *msgs, int num) >> +{ >> +??? struct virtio_i2c *vi = i2c_get_adapdata(adap); >> +??? struct virtio_i2c_msg *vmsg_o, *vmsg_i; >> +??? struct virtqueue *vq = vi->vq; >> +??? unsigned long time_left; >> +??? int len, i, ret = 0; >> + >> +??? vmsg_o = kzalloc(sizeof(*vmsg_o), GFP_KERNEL); >> +??? if (!vmsg_o) >> +??????? return -ENOMEM; > > > It looks to me we can avoid the allocation by embedding virtio_i2c_msg > into struct virtio_i2c; > Yeah... T...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...n virtqueue_add_sgs(vq, sgs, outcnt, incnt, vmsg, GFP_KERNEL); +} + +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) +{ + struct virtio_i2c *vi = i2c_get_adapdata(adap); + struct virtio_i2c_msg *vmsg_o, *vmsg_i; + struct virtqueue *vq = vi->vq; + unsigned long time_left; + int len, i, ret = 0; + + vmsg_o = kzalloc(sizeof(*vmsg_o), GFP_KERNEL); + if (!vmsg_o) + return -ENOMEM; + + mutex_lock(&vi->i2c_lock); + vmsg_o->buf = NULL; + for (i = 0; i < num; i++) { + ret = virtio_i2c_add_msg(vq, vmsg_o, &msgs[i]); + if (ret) { + dev_err(&adap-&gt...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...n virtqueue_add_sgs(vq, sgs, outcnt, incnt, vmsg, GFP_KERNEL); +} + +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) +{ + struct virtio_i2c *vi = i2c_get_adapdata(adap); + struct virtio_i2c_msg *vmsg_o, *vmsg_i; + struct virtqueue *vq = vi->vq; + unsigned long time_left; + int len, i, ret = 0; + + vmsg_o = kzalloc(sizeof(*vmsg_o), GFP_KERNEL); + if (!vmsg_o) + return -ENOMEM; + + mutex_lock(&vi->i2c_lock); + vmsg_o->buf = NULL; + for (i = 0; i < num; i++) { + ret = virtio_i2c_add_msg(vq, vmsg_o, &msgs[i]); + if (ret) { + dev_err(&adap-&gt...
2007 Jun 15
0
Branch 'as' - 4 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite.c test/trace
...st char *parameter, gpointer data) +{ + gboolean *quit = data; + + if (g_str_equal (command, "quit")) { + *quit = TRUE; + } +} + static gboolean run_test (const char *filename) { SwfdecLoader *loader; SwfdecPlayer *player; SwfdecBuffer *buffer; - guint advance; + guint time_left; char *str; GString *string; GError *error = NULL; + gboolean quit = FALSE; g_print ("Testing %s:\n", filename); loader = swfdec_loader_new_from_file (filename); @@ -31,6 +42,7 @@ run_test (const char *filename) string = g_string_new (""); player = swfdec...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...uld be carefully taken care of. ... > +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) > +{ > + struct virtio_i2c *vi = i2c_get_adapdata(adap); > + struct virtio_i2c_msg *vmsg_o, *vmsg_i; > + struct virtqueue *vq = vi->vq; > + unsigned long time_left; > + int len, i, ret = 0; > + > + vmsg_o = kzalloc(sizeof(*vmsg_o), GFP_KERNEL); > + if (!vmsg_o) > + return -ENOMEM; > + > + mutex_lock(&vi->i2c_lock); > + vmsg_o->buf = NULL; > + for (i = 0; i < num; i++) { > + ret = virtio_i2c_add_msg(vq, vmsg_o, &amp...
2007 Nov 07
1
thumbnailer/swfdec-thumbnailer.c
thumbnailer/swfdec-thumbnailer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a31d0686b78df2da96b9d8d1e3220e63978bba30 Author: Benjamin Otte <otte at gnome.org> Date: Wed Nov 7 20:02:04 2007 +0100 s/swfdec_player_get_image_size/swfdec_player_get_default_size/ diff --git a/thumbnailer/swfdec-thumbnailer.c b/thumbnailer/swfdec-thumbnailer.c index
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...; + + return virtqueue_add_sgs(vq, sgs, outcnt, incnt, vmsg, GFP_KERNEL); +} + +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) +{ + struct virtio_i2c *vi = i2c_get_adapdata(adap); + struct virtqueue *vq = vi->vq; + struct virtio_i2c_msg *vmsg; + unsigned long time_left; + int len, i, ret = 0; + + mutex_lock(&vi->i2c_lock); + vmsg = &vi->vmsg; + vmsg->buf = NULL; + + for (i = 0; i < num; i++) { + ret = virtio_i2c_add_msg(vq, vmsg, &msgs[i]); + if (ret) { + dev_err(&adap->dev, "failed to add msg[%d] to virtqueue.\n", i);...
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...; + + return virtqueue_add_sgs(vq, sgs, outcnt, incnt, vmsg, GFP_KERNEL); +} + +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) +{ + struct virtio_i2c *vi = i2c_get_adapdata(adap); + struct virtqueue *vq = vi->vq; + struct virtio_i2c_msg *vmsg; + unsigned long time_left; + int len, i, ret = 0; + + mutex_lock(&vi->i2c_lock); + vmsg = &vi->vmsg; + vmsg->buf = NULL; + + for (i = 0; i < num; i++) { + ret = virtio_i2c_add_msg(vq, vmsg, &msgs[i]); + if (ret) { + dev_err(&adap->dev, "failed to add msg[%d] to virtqueue.\n", i);...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...110 { 0a54ec77196674 Jie Deng 2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; 0a54ec77196674 Jie Deng 2020-09-11 116 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); 0a54ec77196674 Jie Deng 2020-09-11 118 vmsg = &vi->vmsg; 0a54ec77196674 Jie Deng 2020-09-11 119 vmsg-&gt...
2020 Sep 07
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...xfer(struct i2c_adapter *adap, struct i2c_msg >>> *msgs, int num) >>> +{ >>> +??? struct virtio_i2c *vi = i2c_get_adapdata(adap); >>> +??? struct virtio_i2c_msg *vmsg_o, *vmsg_i; >>> +??? struct virtqueue *vq = vi->vq; >>> +??? unsigned long time_left; >>> +??? int len, i, ret = 0; >>> + >>> +??? vmsg_o = kzalloc(sizeof(*vmsg_o), GFP_KERNEL); >>> +??? if (!vmsg_o) >>> +??????? return -ENOMEM; >> >> >> It looks to me we can avoid the allocation by embedding >> virtio_i2c_msg in...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); > > 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; > > 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; > > 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; > > 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; > > 0a54ec77196674 Jie Deng 2020-09-11 116 > > 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); > > 0a54ec77196674 Jie Deng 2020-09-11 118 vmsg = &vi->vmsg; > >...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...; + + return virtqueue_add_sgs(vq, sgs, outcnt, incnt, vmsg, GFP_KERNEL); +} + +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) +{ + struct virtio_i2c *vi = i2c_get_adapdata(adap); + struct virtqueue *vq = vi->vq; + struct virtio_i2c_msg *vmsg; + unsigned long time_left; + int len, i, ret = 0; + + mutex_lock(&vi->i2c_lock); + vmsg = &vi->vmsg; + vmsg->buf = NULL; + + for (i = 0; i < num; i++) { + ret = virtio_i2c_add_msg(vq, vmsg, &msgs[i]); + if (ret) { + dev_err(&adap->dev, "failed to add msg[%d] to virtqueue.\n", i);...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...; + + return virtqueue_add_sgs(vq, sgs, outcnt, incnt, vmsg, GFP_KERNEL); +} + +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) +{ + struct virtio_i2c *vi = i2c_get_adapdata(adap); + struct virtqueue *vq = vi->vq; + struct virtio_i2c_msg *vmsg; + unsigned long time_left; + int len, i, ret = 0; + + mutex_lock(&vi->i2c_lock); + vmsg = &vi->vmsg; + vmsg->buf = NULL; + + for (i = 0; i < num; i++) { + ret = virtio_i2c_add_msg(vq, vmsg, &msgs[i]); + if (ret) { + dev_err(&adap->dev, "failed to add msg[%d] to virtqueue.\n", i);...
2009 Feb 02
2
did_not_yield
...] did_not_yield. Completed in 0ms (DB: 12) | [http://127.0.0.1/scanns/status] I think what it says is nothing happened ? class ApplicationController < ActionController::Base ... protected ## attention, below here, all methods are PROTECTED def log_test session[:auth] ? ( @time_left = (session[:expires_at] - Time.now).to_i @time_left<0 ? ( flash[:notice] = ''Too much time without activity ... login_required ''+session[:expires_at].to_s @login_info=''Too much time without activity ... login_required ''+session[:expires_at].to_...